diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-06-15 10:33:46 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-06-15 10:33:46 +1000 |
| commit | a2c1dfbabddc2b4abaf8bf27c9ed9d1b99594859 (patch) | |
| tree | 47fa6b1a0d4d6f1160b8d60d04ee9f6d67e10ce4 /src/codecs/codec.cpp | |
| parent | 1238437717a49924cb45a12b934b3108c402e864 (diff) | |
| download | tangara-fw-a2c1dfbabddc2b4abaf8bf27c9ed9d1b99594859.tar.gz | |
Add vorbis and flac decoders, flesh out codec interface
vorbis doesn't quite work yet, not sure why. will pick it up again
later.
Diffstat (limited to 'src/codecs/codec.cpp')
| -rw-r--r-- | src/codecs/codec.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/codecs/codec.cpp b/src/codecs/codec.cpp index 73bc9032..e23b8702 100644 --- a/src/codecs/codec.cpp +++ b/src/codecs/codec.cpp @@ -8,7 +8,10 @@ #include <memory> #include <optional> + +#include "foxenflac.hpp" #include "mad.hpp" +#include "stbvorbis.hpp" #include "types.hpp" namespace codecs { @@ -17,6 +20,10 @@ auto CreateCodecForType(StreamType type) -> std::optional<ICodec*> { switch (type) { case StreamType::kMp3: return new MadMp3Decoder(); + case StreamType::kFlac: + return new FoxenFlacDecoder(); + case StreamType::kVorbis: + return new StbVorbisDecoder(); default: return {}; } |
