Playback stutters rhythmically, with a noticable "pop" noise
Closed this issue · 2 comments
This appears to me to be an issue in playback.cpp, inasmuch as it seems like the switch audio buffers (not the transfer buffer, which actually overflows on occasion) are being underrun, but I'm not sure what I'm doing wrong there.
Some notes on this: From fiddling, decreasing the size of the decode buffer (so that less is asked for on each ov_read) and increasing the size of AUDIO_BUFFER_SAMPLES (so that each individual audoutAudioAppendBuffer buffer is larger) seem to alleviate the effect somewhat, but not completely. Also causes a delay in the beginning of playback and a bunch of noise at the very start of playback. The former is understandable (we're decoding less with each loop, and we've made the audio buffers larger, so it's taking longer to fill one), the latter unexplained.
In either case, I don't think this is the solution to the problem, so I haven't pushed any of this fiddling yet.
Fixed! The issue was a mismatch between fillPlayBuffer taking a buffer size in multiples of 16 bits and the decode buffer being specified in multiple of 8.