PortAudio / portaudio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.
Other
1.37k stars 286 forks source link

Fix WDM-KS buffer position alignment #931

Closed dechamps closed 1 week ago

dechamps commented 3 weeks ago

The previous code is only correct if bytesPerFrame is a power of two. If it's not (e.g. 2-channel 24-bit = 6 bytes per frame), then the computed buffer position is corrupted. This can lead the code to use the wrong buffer half, resulting in glitchy audio.

Fixes #763

RossBencina commented 2 weeks ago

Thanks for tracking this down. Great to have our WDM/KS support inch closer to solidity. I'll wait for Phil's review before merging.