serenity/Meta
kleines Filmröllchen 264cc76ab4 LibAudio: Move audio stream buffering into the loader
Before, some loader plugins implemented their own buffering (FLAC&MP3),
some didn't require any (WAV), and some didn't buffer at all (QOA). This
meant that in practice, while you could load arbitrary amounts of
samples from some loader plugins, you couldn't do that with some others.
Also, it was ill-defined how many samples you would actually get back
from a get_more_samples call.

This commit fixes that by introducing a layer of abstraction between the
loader and its plugins (because that's the whole point of having the
extra class!). The plugins now only implement a load_chunks() function,
which is much simpler to implement and allows plugins to play fast and
loose with what they actually return. Basically, they can return many
chunks of samples, where one chunk is simply a convenient block of
samples to load. In fact, some loaders such as FLAC and QOA have
separate internal functions for loading exactly one chunk. The loaders
*should* load as many chunks as necessary for the sample count to be
reached or surpassed (the latter simplifies loading loops in the
implementations, since you don't need to know how large your next chunk
is going to be; a problem for e.g. FLAC). If a plugin has no problems
returning data of arbitrary size (currently WAV), it can return a single
chunk that exactly (or roughly) matches the requested sample count. If a
plugin is at the stream end, it can also return less samples than was
requested! The loader can handle all of these cases and may call into
load_chunk multiple times. If the plugin returns an empty chunk list (or
only empty chunks; again, they can play fast and loose), the loader
takes that as a stream end signal. Otherwise, the loader will always
return exactly as many samples as the user requested. Buffering is
handled by the loader, allowing any underlying plugin to deal with any
weird sample count requirement the user throws at it (looking at you,
SoundPlayer!).

This (not accidentally!) makes QOA work in SoundPlayer.
2023-03-13 13:25:42 +01:00
..
Azure Meta+CMake: Remove "image" ninja target in favor of "qemu-image" 2023-03-12 01:48:56 +00:00
CMake LibWeb: Support interfaces with the [Global] extended attribute 2023-03-07 23:33:34 +00:00
HeaderCheck HeaderCheck: Also check AK for broken headers 2022-09-18 13:27:24 -04:00
Lagom LibAudio: Move audio stream buffering into the loader 2023-03-13 13:25:42 +01:00
Screenshots Meta: Move screenshots into subdir 2022-04-03 13:14:15 +01:00
ShellCompletions/zsh Meta: Remove i686 target 2022-12-28 11:53:41 +01:00
Websites Everywhere: Use title case for man section titles 2022-02-25 12:06:31 -05:00
analyze-qemu-coverage.sh Meta: Use absolute paths in Meta/analyze-qemu-coverage.sh 2022-12-10 11:51:16 +00:00
bochsrc Meta: Add SSE3, SMAP and SMEP to our bochsrc 2021-12-28 11:51:50 +01:00
build-image-extlinux.sh Meta: Tweak shell_include.sh 2022-12-20 09:23:32 -05:00
build-image-grub.sh Meta: Tweak shell_include.sh 2022-12-20 09:23:32 -05:00
build-image-limine.sh Meta: Tweak shell_include.sh 2022-12-20 09:23:32 -05:00
build-image-qemu.sh Meta: Remove i686 target 2022-12-28 11:53:41 +01:00
build-manpages-website.sh Meta/build-manpages-website: Copy all manpage PNGs 2023-01-08 13:35:29 +01:00
build-native-partition.sh Meta: Tweak shell_include.sh 2022-12-20 09:23:32 -05:00
build-root-filesystem.sh Base+Meta: Remove invalid symlinks from Base for more and env 2023-03-04 15:18:57 +01:00
check-ak-test-files.sh Meta: Fix check for AK test inclusion 2022-09-13 08:29:09 +00:00
check-debug-flags.sh Kernel: Split the Ext2FileSystem.{cpp,h} files into smaller components 2022-11-08 02:54:48 -07:00
check-emoji.py Meta: Disallow emoji images with invalid code points in their file name 2022-10-26 18:40:20 +01:00
check-markdown.sh Meta: Also check CONTRIBUTING with check-markdown.sh 2022-07-11 11:35:56 +02:00
check-newlines-at-eof.py Meta: Don't check for newlines at EOF in Tests/LibWeb/Layout/ 2023-03-11 13:05:35 +01:00
check-png-sizes.sh Meta: Add a PNG size check to CI and pre-commit checks 2022-06-18 21:58:43 +04:30
check-style.py Everywhere: Remove "LibC/" includes, add lint-rule against it 2023-01-07 10:01:37 -07:00
check-symbols.sh Meta: Make x86-64 target the default 2022-10-03 11:14:53 +02:00
convert-markdown-links.lua Meta/build-manpages-website: Use absolute paths for all links 2023-01-08 13:35:29 +01:00
debug-kernel.sh Meta: Remove i686 target 2022-12-28 11:53:41 +01:00
export-argsparser-manpages.sh CI: Ensure the manpage generation step shuts down the VM on failure 2022-10-31 22:10:14 +00:00
extlinux.conf Everywhere: Get rid of the fbdev kernel boot argument remainders 2022-08-14 01:03:23 +01:00
generate-embedded-resource-assembly.sh Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
generate-libwasm-spec-test.py Meta: Skip wasm tests whose modules cannot be loaded 2022-03-20 10:44:32 +03:30
generate-libwasm-spec-test.sh Meta: Run the Wasm spec tests in CI 2021-05-27 17:28:41 +04:30
grub-ebr.cfg Meta: Use correct boot device selections when using GRUB images 2022-09-02 23:36:08 +01:00
grub-gpt.cfg Meta: Use correct boot device selections when using GRUB images 2022-09-02 23:36:08 +01:00
grub-mbr.cfg Meta: Use correct boot device selections when using GRUB images 2022-09-02 23:36:08 +01:00
install-ports-tree.sh Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIR 2021-04-20 15:27:52 +02:00
label-pull-requests.js CI: Automatically apply pull request labels for generic PR actions 2023-01-06 15:25:30 +01:00
limine.cfg Everywhere: Get rid of the fbdev kernel boot argument remainders 2022-08-14 01:03:23 +01:00
lint-ci.sh Meta: Remove 'time' invocation in lint-ci 2022-09-22 00:45:10 +02:00
lint-clang-format.sh Meta: Switch to clang-format-15 as the standard formatter 2022-12-03 23:52:23 +00:00
lint-commit.sh CI: Add a check to report git merge commit 2022-12-10 12:07:06 +00:00
lint-executable-resources.sh Meta: Add special case for macOS 2021-11-02 12:23:30 +01:00
lint-gml-format.sh Meta: Only check changed files in lint-gml-format.sh 2022-09-18 18:45:25 -07:00
lint-keymaps.py Everywhere: "file name" => "filename" 2021-04-29 22:16:18 +02:00
lint-ports.py Meta: Add check if AvailablePorts.md is sorted 2022-06-02 23:18:06 +01:00
lint-prettier.sh LibJS: Implement ImportCall and HostImportModuleDynamically 2022-01-22 01:21:18 +00:00
lint-python.sh Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
lint-shell-scripts.sh Meta: Allow shellcheck to search sourced files in the script directory 2022-10-16 23:39:45 +02:00
new-project.sh Meta: Add new-project.sh :^) 2021-08-13 21:12:17 +04:30
refresh-serenity-qtcreator.sh Meta: Make QtCreator aware of all CMake files 2021-09-15 20:21:19 +00:00
run.sh Meta: Use the correct boot device addressing mode for NVMe devices 2023-03-11 13:15:00 +00:00
serenity.sh Meta+CMake: Remove "image" ninja target in favor of "qemu-image" 2023-03-12 01:48:56 +00:00
serenity_gdb.py Meta: Avoid showing elements in extremely large vectors in gdb 2022-04-01 21:41:41 +01:00
shell_include.sh Meta: Tweak shell_include.sh 2022-12-20 09:23:32 -05:00
text-to-cpp-string.sh Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
toot-commits.js CI: Add script to post mastodon toots for commits on master 2023-02-10 13:54:07 +00:00
tweet-commits.js Meta: Ensure long messages fit in commit tweet 2021-06-18 13:34:17 +01:00