mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
6de55e416b
`count` is the number of stereo samples to write (where each stereo sample is two shorts), while `BUFFER_SIZE` is the size of the buffer in shorts. So `count` needs to be multiplied by `2`, not `BUFFER_SIZE`. Also, when this check was failed, the previous code just clobbered whatever was past the end of the buffer after logging the warning, which corrupted `basename`, eventually resulting in Dolphin crashing. This affected Datel's Wii-compatible Action Replay, which uses a block size of 2298, or 18384 stereo samples, which is 36768 shorts, which is bigger than the buffer size of 32768. (However, the previous commit means that only one block is transfered at a time, eliminating this issue; fixing the bounds check is just a general safety thing instead of an actual bugfix now.) |
||
---|---|---|
.. | ||
AlsaSoundStream.cpp | ||
AlsaSoundStream.h | ||
AudioCommon.cpp | ||
AudioCommon.h | ||
AudioStretcher.cpp | ||
AudioStretcher.h | ||
CMakeLists.txt | ||
CubebStream.cpp | ||
CubebStream.h | ||
CubebUtils.cpp | ||
CubebUtils.h | ||
Enums.h | ||
Mixer.cpp | ||
Mixer.h | ||
NullSoundStream.cpp | ||
NullSoundStream.h | ||
OpenALStream.cpp | ||
OpenALStream.h | ||
OpenSLESStream.cpp | ||
OpenSLESStream.h | ||
PulseAudioStream.cpp | ||
PulseAudioStream.h | ||
SoundStream.h | ||
SurroundDecoder.cpp | ||
SurroundDecoder.h | ||
WASAPIStream.cpp | ||
WASAPIStream.h | ||
WaveFile.cpp | ||
WaveFile.h |