Add encoder and decoder for opus audio codec

This commit is contained in:
Hannes Ellinger 2015-06-14 11:35:41 +02:00
parent 21a9aa3e32
commit 4fda33a20e
8 changed files with 228 additions and 17 deletions

View file

@ -22,6 +22,7 @@
#include <memory>
#include <unistd.h>
#include "oggDecoder.h"
#include "opusDecoder.h"
#include "pcmDecoder.h"
#include "flacDecoder.h"
#include "alsaPlayer.h"
@ -116,6 +117,8 @@ void Controller::worker()
logO << "Codec: " << headerChunk->codec << "\n";
if (headerChunk->codec == "ogg")
decoder_ = new OggDecoder();
else if (headerChunk->codec == "opus")
decoder_ = new OpusDecoderWrapper();
else if (headerChunk->codec == "pcm")
decoder_ = new PcmDecoder();
else if (headerChunk->codec == "flac")