1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 17:27:35 +00:00
serenity/Userland/Applications/SoundPlayer
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
..
BarsVisualizationWidget.cpp SoundPlayer+LibDSP: Move the FFT implementation to LibDSP 2021-11-24 23:45:08 +00:00
BarsVisualizationWidget.h SoundPlayer: Fix inconsistencies and code duplication 2021-10-25 23:37:18 +02:00
CMakeLists.txt SoundPlayer+LibDSP: Move the FFT implementation to LibDSP 2021-11-24 23:45:08 +00:00
Common.h SoundPlayer: Allow playback progress slider jump to cursor 2021-11-04 23:45:26 +01:00
M3UParser.cpp SoundPlayer: Make M3UParser more idiomatic 2021-10-25 23:37:18 +02:00
M3UParser.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
main.cpp SoundPlayer: Implement playlist shuffle mode 2021-10-25 23:37:18 +02:00
NoVisualizationWidget.cpp LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file() 2021-11-08 00:35:27 +01:00
NoVisualizationWidget.h SoundPlayer: Fix inconsistencies and code duplication 2021-10-25 23:37:18 +02:00
PlaybackManager.cpp LibAudio: New error propagation API in Loader and Buffer 2021-11-28 13:33:51 -08:00
PlaybackManager.h SoundPlayer: Fix inconsistencies and code duplication 2021-10-25 23:37:18 +02:00
Player.cpp LibAudio: New error propagation API in Loader and Buffer 2021-11-28 13:33:51 -08:00
Player.h SoundPlayer: Fix stack-use-after-scope when playing file in loop mode 2021-11-08 16:34:03 -08:00
Playlist.cpp LibAudio: New error propagation API in Loader and Buffer 2021-11-28 13:33:51 -08:00
Playlist.h SoundPlayer: Implement playlist shuffle mode 2021-10-25 23:37:18 +02:00
PlaylistWidget.cpp Applications: Fix visibility of Object-derivative constructors 2021-11-02 22:56:53 +01:00
PlaylistWidget.h Applications: Fix visibility of Object-derivative constructors 2021-11-02 22:56:53 +01:00
SampleWidget.cpp Everywhere: Use AK/Math.h if applicable 2021-07-19 16:34:21 +04:30
SampleWidget.h SoundPlayer: Fix inconsistencies and code duplication 2021-10-25 23:37:18 +02:00
SoundPlayerWidgetAdvancedView.cpp SoundPlayer: Add keyboard shortcuts for stop and volume 2021-11-13 11:53:31 +01:00
SoundPlayerWidgetAdvancedView.h SoundPlayer: Make 'volume_slider' a member variable 2021-11-13 11:53:31 +01:00
VisualizationWidget.h Applications: Fix visibility of Object-derivative constructors 2021-11-02 22:56:53 +01:00