1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

LibAudio: Add basic MP3 Decoder

This is a basic MPEG-1 layer 3 audio decoder. It supports all
sample rates and stereo modes except for freeformat.
This commit is contained in:
Arne Elster 2022-02-24 11:27:48 +01:00 committed by Andreas Kling
parent 6a64aabce8
commit 7223b593cb
Notes: sideshowbarker 2024-07-17 18:13:20 +09:00
5 changed files with 1106 additions and 0 deletions

View file

@ -6,6 +6,7 @@
#include <LibAudio/FlacLoader.h>
#include <LibAudio/Loader.h>
#include <LibAudio/MP3Loader.h>
#include <LibAudio/WavLoader.h>
namespace Audio {
@ -27,6 +28,11 @@ Result<NonnullOwnPtr<LoaderPlugin>, LoaderError> Loader::try_create(StringView p
if (!initstate1.is_error())
return plugin;
plugin = adopt_own(*new MP3LoaderPlugin(path));
auto initstate2 = plugin->initialize();
if (!initstate2.is_error())
return plugin;
return LoaderError { "No loader plugin available" };
}