mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03:00
96d02a3e75
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. |
||
---|---|---|
.. | ||
ProcessorParameterWidget | ||
AudioPlayerLoop.cpp | ||
AudioPlayerLoop.h | ||
CMakeLists.txt | ||
KeysWidget.cpp | ||
KeysWidget.h | ||
KnobsWidget.cpp | ||
KnobsWidget.h | ||
main.cpp | ||
MainWidget.cpp | ||
MainWidget.h | ||
Music.h | ||
PlayerWidget.cpp | ||
PlayerWidget.h | ||
RollWidget.cpp | ||
RollWidget.h | ||
SamplerWidget.cpp | ||
SamplerWidget.h | ||
Track.cpp | ||
Track.h | ||
TrackManager.cpp | ||
TrackManager.h | ||
WaveWidget.cpp | ||
WaveWidget.h |