class for compressing audio to be sent over network
More...
#include <audioencoder.h>
|
void | frameReady (quint32 aCallId, quint32 aSeqNo, const QByteArray &aAudioData) |
|
|
void | frameEncoded (quint32 aCallId, quint32 aSeqNo, const QByteArray &aEncodedData) |
|
class for compressing audio to be sent over network
This class encapsulates opus encoder for packing audio over network. Future releases may include other options regarding the codec or type of input (audio/video/feeling/touch/smell/other?)
AudioEncoder::AudioEncoder |
( |
quint32 |
aSampleRate = 8000 , |
|
|
quint32 |
aNumChannels = 1 |
|
) |
| |
AudioEncoder::~AudioEncoder |
( |
| ) |
|
void AudioEncoder::frameEncoded |
( |
quint32 |
aCallId, |
|
|
quint32 |
aSeqNo, |
|
|
const QByteArray & |
aEncodedData |
|
) |
| |
|
signal |
This signal is emitted after audio frame has been encoded into opus format. When audio data is sent in via slot frameReady then this signal is emitted as result of succesful processing.
- Parameters
-
aCallId | call identifer of the audio stream |
aSeqNo | sequence number of frame inside stream |
aEncodedData | raw opus frame, as it comes out from opus library call opus_encode_float(). |
void AudioEncoder::frameReady |
( |
quint32 |
aCallId, |
|
|
quint32 |
aSeqNo, |
|
|
const QByteArray & |
aAudioData |
|
) |
| |
|
slot |
Input to encoder cames in via this method.
- Parameters
-
aCallId | call identifer of the audio stream |
aSeqNo | sequence number of frame inside stream |
aAudioData | raw, unpacked audio samples. The byte-array must contain an array of floats in [-1,1] range. |
unsigned char* AudioEncoder::iEncodedData |
|
private |
OpusEncoder* AudioEncoder::iEncoder |
|
private |
const quint32 AudioEncoder::iNumChannels |
|
private |
The documentation for this class was generated from the following file: