mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-19 01:18:17 +02:00
Add encoder and decoder for opus audio codec
This commit is contained in:
parent
21a9aa3e32
commit
4fda33a20e
8 changed files with 228 additions and 17 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue