mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
23d5b99fbf
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. |
||
---|---|---|
.. | ||
Buffer.cpp | ||
Buffer.h | ||
ClientConnection.cpp | ||
ClientConnection.h | ||
CMakeLists.txt | ||
Loader.cpp | ||
Loader.h | ||
WavLoader.cpp | ||
WavLoader.h | ||
WavWriter.cpp | ||
WavWriter.h |