ladybird/Userland/Libraries/LibAudio
Nick Miller 23d5b99fbf LibAudio: Make Loader::seek() treat its input as a sample index
This fixes a bug where if you try to play a Wave file a second
time (or loop with `aplay -l`), the second time will be pure
noise.

The function `Audio::Loader::seek` is meant to seek to a specific
audio sample, e.g. seek(0) should go to the first audio sample.
However, WavLoader was interpreting seek(0) as the beginning
of the file or stream, which contains non-audio header data.

This fixes the bug by capturing the byte offset of the start of the
audio data, and offseting the raw file/stream seek by that amount.
2021-06-09 17:30:08 +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: Make Loader::seek() treat its input as a sample index 2021-06-09 17:30:08 +04:30
WavLoader.cpp LibAudio: Make Loader::seek() treat its input as a sample index 2021-06-09 17:30:08 +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