serenity/Userland
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
..
Applets Applets/Network: Replace fprintf(stderr) with dbgln() 2021-05-31 17:44:01 +01:00
Applications Everywhere: Replace Vector<T*> with nonnull entries with Vector<T&> 2021-06-08 19:14:24 +02:00
Demos CatDog: Enhance the speech bubble artificial intelligence 2021-06-07 21:52:16 +02:00
DevTools Everywhere: Replace Vector<T*> with nonnull entries with Vector<T&> 2021-06-08 19:14:24 +02:00
DynamicLoader Userland: Port UBSAN implementation to userspace 2021-05-27 15:18:03 +02:00
Games AK+Everywhere: Disallow constructing Functions from incompatible types 2021-06-06 00:27:30 +04:30
Libraries LibAudio: Make Loader::seek() treat its input as a sample index 2021-06-09 17:30:08 +04:30
Services Everywhere: Replace Vector<T*> with nonnull entries with Vector<T&> 2021-06-08 19:14:24 +02:00
Shell Shell: Make time stop parsing options on first non-option 2021-06-08 11:30:58 +02:00
Utilities LibJS: Add the Set built-in object 2021-06-09 11:48:04 +01:00
CMakeLists.txt Tests: Establish root Tests directory, move Userland/Tests there 2021-05-06 17:54:28 +02:00