-
Notifications
You must be signed in to change notification settings - Fork 279
Description
To reproduce this issue, try following the music_wav example with a 2-channel WAV file with audio within the first ~11ms. Record the audio output and compare with the input. Instead of being the same, the first 11ms of the recorded output should be about double-length and mono (due to the stereo file being read as mono and converted to stereo.)
This seems to be related to the interaction between the mixer's UniformSourceIterator and SourcesQueueOutput, which plays "silence" at 1 channel when there are no sources. In particular, changing the "silence" played by SourcesQueueOutput from 1 channel to 2 channels (by editing my local copy of queue.rs) causes the sound to play normally.
I'm suspicious of the conditional logic on current_span_len -- I wonder if it's transitioning from silence to an actual sound improperly, and returning a span length of THRESHOLD on that borderline. But I can't investigate it right now, so I'll leave this issue here until I get the time to look at it further.