On 5/17/19 5:07 PM, Andrew Eikum wrote:
On Wed, May 08, 2019 at 03:49:15PM +0300, Gabriel Ivăncescu wrote:
Only fixes the PulseAudio driver for the first bug, not ALSA.
Sorry for the long delay in reviewing this. This crashes the King of Dragon Pass demo for me. Looks like we're not ending the inner do-while loop in the U8 case somehow, so it runs past the end of the buffer.
Andrew
Hi Andrew, thanks for the review. That's definitely weird, since it's 1 byte per sample, the only way it can happen is if the buffer is truncated in terms of channels (so e.g. for stereo, an odd amount of bytes, last sample only has left channel).
Can you please add a quick TRACE before the loop, and tell me what are the values of 'channels' and 'bytes' before it crashes? (or just send me the log)
(I don't think that having truncated buffers is valid in Pulse, so I assumed against it in the code to simplify it and avoid overhead, but if this trace says otherwise, I'll have to come up with something)