ladybird/Userland/Applications/Piano
kleines Filmröllchen 96d02a3e75 LibAudio: New error propagation API in Loader and Buffer
Previously, a libc-like out-of-line error information was used in the
loader and its plugins. Now, all functions that may fail to do their job
return some sort of Result. The universally-used error type ist the new
LoaderError, which can contain information about the general error
category (such as file format, I/O, unimplemented features), an error
description, and location information, such as file index or sample
index.

Additionally, the loader plugins try to do as little work as possible in
their constructors. Right after being constructed, a user should call
initialize() and check the errors returned from there. (This is done
transparently by Loader itself.) If a constructor caused an error, the
call to initialize should check and return it immediately.

This opportunity was used to rework a lot of the internal error
propagation in both loader classes, especially FlacLoader. Therefore, a
couple of other refactorings may have sneaked in as well.

The adoption of LibAudio users is minimal. Piano's adoption is not
important, as the code will receive major refactoring in the near future
anyways. SoundPlayer's adoption is also less important, as changes to
refactor it are in the works as well. aplay's adoption is the best and
may serve as an example for other users. It also includes new buffering
behavior.

Buffer also gets some attention, making it OOM-safe and thereby also
propagating its errors to the user.
2021-11-28 13:33:51 -08:00
..
ProcessorParameterWidget Piano: Create controller widgets for processor parameters 2021-11-16 00:09:58 +00:00
AudioPlayerLoop.cpp LibAudio: New error propagation API in Loader and Buffer 2021-11-28 13:33:51 -08:00
AudioPlayerLoop.h Applications: Fix visibility of Object-derivative constructors 2021-11-02 22:56:53 +01:00
CMakeLists.txt Piano: Port to LibMain 2021-11-22 23:56:22 +01:00
KeysWidget.cpp Piano: Move to LibDSP's Classic synthesizer 2021-11-22 22:26:17 +01:00
KeysWidget.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
KnobsWidget.cpp Piano: Move to LibDSP's Classic synthesizer 2021-11-22 22:26:17 +01:00
KnobsWidget.h Piano: Move to LibDSP's Classic synthesizer 2021-11-22 22:26:17 +01:00
main.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
MainWidget.cpp Piano: Move to LibDSP's Classic synthesizer 2021-11-22 22:26:17 +01:00
MainWidget.h Piano: Add Play/Pause, Forward and Back buttons 2021-07-14 12:07:43 +04:30
Music.h Piano: Move to LibDSP's Classic synthesizer 2021-11-22 22:26:17 +01:00
PlayerWidget.cpp LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file() 2021-11-08 00:35:27 +01:00
PlayerWidget.h Piano: Add Play/Pause, Forward and Back buttons 2021-07-14 12:07:43 +04:30
RollWidget.cpp LibGfx: Use ErrorOr<T> for Bitmap::try_create() 2021-11-08 00:35:27 +01:00
RollWidget.h Piano: Move to LibDSP's Classic synthesizer 2021-11-22 22:26:17 +01:00
SamplerWidget.cpp Piano: Move to LibDSP's Classic synthesizer 2021-11-22 22:26:17 +01:00
SamplerWidget.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Track.cpp LibAudio: New error propagation API in Loader and Buffer 2021-11-28 13:33:51 -08:00
Track.h Piano: Move to LibDSP's Classic synthesizer 2021-11-22 22:26:17 +01:00
TrackManager.cpp Piano: Move to LibDSP's Classic synthesizer 2021-11-22 22:26:17 +01:00
TrackManager.h Piano: Move to LibDSP's Classic synthesizer 2021-11-22 22:26:17 +01:00
WaveWidget.cpp Piano: Move to LibDSP's Classic synthesizer 2021-11-22 22:26:17 +01:00
WaveWidget.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00