SOURCE-CODE CHECK
The channels are averaged
The current mixToMono function adds each channel sample divided by the channel count. For two channels that means (left + right) / 2. The pitch detector receives this result, not the separate left and right waveforms. Equal opposite samples cancel exactly; partial opposition can weaken a melody without removing it entirely.