mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 00:47:36 +00:00
![]() When samples are requested in `Audio::Loader::get_more_samples`, the request comes in as a max number of bytes to read. However, the requested number of bytes may not be an even multiple of the bytes per sample of the loaded file. If this is the case, and the bytes are read from the file/stream, then the last sample will be a partial/runt sample, which then offsets the remainder of the stream, causing white noise in playback. This bug was discovered when trying to play 24-bit Wave files, which happened to have a sample size that never aligned with the number of requested bytes. This commit fixes the bug by only reading a multiple of "bytes per sample" for the loaded file. |
||
---|---|---|
.. | ||
Buffer.cpp | ||
Buffer.h | ||
ClientConnection.cpp | ||
ClientConnection.h | ||
CMakeLists.txt | ||
Loader.cpp | ||
Loader.h | ||
WavLoader.cpp | ||
WavLoader.h | ||
WavWriter.cpp | ||
WavWriter.h |