From 0e04eb918ec976017276306181282769d8896c83 Mon Sep 17 00:00:00 2001 From: ailurux Date: Thu, 11 Jan 2024 05:54:30 +0000 Subject: wav-codec (#13) here is a wav decoder, enjoy! Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/13 Reviewed-by: cooljqln Co-authored-by: ailurux Co-committed-by: ailurux --- src/codecs/codec.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/codecs/codec.cpp') diff --git a/src/codecs/codec.cpp b/src/codecs/codec.cpp index d81d4b05..7bc591aa 100644 --- a/src/codecs/codec.cpp +++ b/src/codecs/codec.cpp @@ -14,6 +14,7 @@ #include "opus.hpp" #include "types.hpp" #include "vorbis.hpp" +#include "wav.hpp" namespace codecs { @@ -21,7 +22,7 @@ auto StreamTypeToString(StreamType t) -> std::string { switch (t) { case StreamType::kMp3: return "Mp3"; - case StreamType::kPcm: + case StreamType::kWav: return "Wav"; case StreamType::kVorbis: return "Vorbis"; @@ -44,6 +45,8 @@ auto CreateCodecForType(StreamType type) -> std::optional { return new MiniFlacDecoder(); case StreamType::kOpus: return new XiphOpusDecoder(); + case StreamType::kWav: + return new WavDecoder(); default: return {}; } -- cgit v1.2.3