6 #ifndef SWIFT_SOUND_CODECS_OPUSENCODER_H
7 #define SWIFT_SOUND_CODECS_OPUSENCODER_H
12 #include "opus/opus.h"
16 namespace swift::sound::codecs
23 COpusEncoder(
int sampleRate,
int channels,
int application = OPUS_APPLICATION_VOIP);
35 void setBitRate(
int bitRate);
38 QByteArray encode(
const QVector<qint16> &pcmSamples,
int samplesLength,
int *encodedLength);
41 OpusEncoder *opusEncoder =
nullptr;
43 static constexpr
int maxDataBytes = 4000;
COpusEncoder & operator=(const COpusEncoder &temp_obj)=delete
Non assignable.
COpusEncoder(const COpusEncoder &temp_obj)=delete
Non copyable.
#define SWIFT_SOUND_EXPORT
Export a class or function from the library.