also, the common ancestor of mammals and birds did not have a tympanic ear, so sound localization evolved differently in the avian vs. mammalian hearing systems. A good review is here: https://journals.physiology.org/doi/pdf/10.1152/physrev.0002.... How the brain calculates interaural time delays is actually an interesting problem as the time delays are so short, that it is less time than a neuron has to fire an action potential.
that was the start of it. the offset otic openings result in differential arrival times of the acoustic peaks, thus phase differential.
neurosynaptically, there is no phase, there is frequency shift corresponding to presynaptic intensity, and there is spatio-temporal integration of these signals. temporal integration is where "phase" matters
its all a mix of "digital" all or nothing "gates" and analog frequency shift propagation of the "gate" output.
its all made nebulous by the adaptive, and hysteretic nature of the elements in neural "circuitry"
there appears to be no software for this, its all hardware, the signal format flips as it travels through the anatomy.