From a2c1dfbabddc2b4abaf8bf27c9ed9d1b99594859 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 15 Jun 2023 10:33:46 +1000 Subject: Add vorbis and flac decoders, flesh out codec interface vorbis doesn't quite work yet, not sure why. will pick it up again later. --- src/codecs/codec.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/codecs/codec.cpp') 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 #include + +#include "foxenflac.hpp" #include "mad.hpp" +#include "stbvorbis.hpp" #include "types.hpp" namespace codecs { @@ -17,6 +20,10 @@ auto CreateCodecForType(StreamType type) -> std::optional { switch (type) { case StreamType::kMp3: return new MadMp3Decoder(); + case StreamType::kFlac: + return new FoxenFlacDecoder(); + case StreamType::kVorbis: + return new StbVorbisDecoder(); default: return {}; } -- cgit v1.2.3