1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00
serenity/Userland/Libraries/LibAudio
Nick Miller dec9ed066d LibAudio: Avoid reading past the end of sample data
Prior code in `WavLoader::get_more_samples()` would attempt to
read the requested number of samples without actually checking
whether that many samples were remaining in the stream.
This was the cause of an audible pop at the end of a track, due
to reading non-audio data that is sometimes at the end of a Wave file.

Now we only attempt to read up to the end of sample data, but no
further.

Also, added comments to clarify the meaning of "sample", and how it
should be independent of the number of channels.
2021-06-21 03:13:59 +04:30
..
Buffer.cpp LibAudio: Support 32 and 64-bit float WAV files 2021-04-26 19:08:40 +02:00
Buffer.h LibAudio: Support 32 and 64-bit float WAV files 2021-04-26 19:08:40 +02:00
ClientConnection.cpp LibIPC: Remove unnecessary IPC::ServerConnection::handshake() 2021-05-23 09:53:55 +02:00
ClientConnection.h Userland: Mark subclasses of IPC::{Client,Server}Connection final 2021-05-23 09:53:55 +02:00
CMakeLists.txt Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Loader.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Loader.h LibAudio: Avoid reading past the end of sample data 2021-06-21 03:13:59 +04:30
WavLoader.cpp LibAudio: Avoid reading past the end of sample data 2021-06-21 03:13:59 +04:30
WavLoader.h LibAudio: Make Loader::seek() treat its input as a sample index 2021-06-09 17:30:08 +04:30
WavWriter.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
WavWriter.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00