overte/plugins/opusCodec/src/OpusDecoder.h
Marcus Llewellyn 24669c98f6 Made changes requested by reviewer
Fixed missing copyright headers.
Fixed exceeding 120 columns.
Fixed #include
Fixed if conditional style.
Fixed C++ reference symbol placement.
2020-01-15 12:57:18 -06:00

39 lines
833 B
C++

//
// OpusCodecManager.h
// plugins/opusCodec/src
//
// Copyright 2020 Dale Glass
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef OPUSDECODER_H
#define OPUSDECODER_H
#include <plugins/CodecPlugin.h>
#include "opus/opus.h"
class AthenaOpusDecoder : public Decoder {
public:
AthenaOpusDecoder(int sampleRate, int numChannels);
~AthenaOpusDecoder() override;
virtual void decode(const QByteArray& encodedBuffer, QByteArray& decodedBuffer) override;
virtual void lostFrame( QByteArray &decodedBuffer) override;
private:
int _encodedSize;
OpusDecoder *_decoder = nullptr;
int _opus_sample_rate = 0;
int _opus_num_channels = 0;
int _decoded_size = 0;
};
#endif // OPUSDECODER_H