dolphin/Source/Core/AudioCommon
Pokechu22 6de55e416b WaveFile: Fix size check
`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.)
2022-10-22 11:44:38 -07:00
..
AlsaSoundStream.cpp Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
AlsaSoundStream.h AudioCommon: rename isValid() to IsValid() 2021-08-08 03:05:03 +01:00
AudioCommon.cpp AudioCommon: Move sound stream variables to Core::System. 2022-08-31 21:44:21 +02:00
AudioCommon.h AudioCommon: Move sound stream variables to Core::System. 2022-08-31 21:44:21 +02:00
AudioStretcher.cpp Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
AudioStretcher.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
CMakeLists.txt cmake: Don't use PCH with Qt6. 2022-05-22 01:19:44 +02:00
CubebStream.cpp Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
CubebStream.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
CubebUtils.cpp StripSpaces: only strip spaces 2022-07-25 18:40:12 -07:00
CubebUtils.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
Enums.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
Mixer.cpp Mixer: Add assertions regarding num_samples versus buffer length 2022-09-08 12:10:10 -07:00
Mixer.h Do not directly store input sample rate, rather just store a divisor for that sample rate, with it using a fixed dividend of 54000000 * 2. 2022-07-03 15:07:06 -07:00
NullSoundStream.cpp AudioCommon: make SoundLoop() non-virtual and private 2021-08-08 00:15:05 +01:00
NullSoundStream.h AudioCommon: rename isValid() to IsValid() 2021-08-08 03:05:03 +01:00
OpenALStream.cpp Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
OpenALStream.h Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
OpenSLESStream.cpp treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
OpenSLESStream.h AudioCommon: rename isValid() to IsValid() 2021-08-08 03:05:03 +01:00
PulseAudioStream.cpp Port Main.DSP to MainSettings 2021-10-15 23:24:46 -04:00
PulseAudioStream.h AudioCommon: rename isValid() to IsValid() 2021-08-08 03:05:03 +01:00
SoundStream.h AudioCommon: rename isValid() to IsValid() 2021-08-08 03:05:03 +01:00
SurroundDecoder.cpp Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
SurroundDecoder.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
WASAPIStream.cpp Use HRWrap in remaining locations 2022-01-09 12:44:55 -08:00
WASAPIStream.h AudioCommon: rename isValid() to IsValid() 2021-08-08 03:05:03 +01:00
WaveFile.cpp WaveFile: Fix size check 2022-10-22 11:44:38 -07:00
WaveFile.h Do not directly store input sample rate, rather just store a divisor for that sample rate, with it using a fixed dividend of 54000000 * 2. 2022-07-03 15:07:06 -07:00