Classified ads
Public Slots | Signals | Public Member Functions | Private Attributes | List of all members
AudioDecoder Class Reference

class for de-compressing audio received from network More...

#include <audiodecoder.h>

Inheritance diagram for AudioDecoder:
Inheritance graph
[legend]
Collaboration diagram for AudioDecoder:
Collaboration graph
[legend]

Public Slots

void frameReceived (quint32 aCallId, quint32 aSeqNo, const QByteArray &aAudioData, Hash aOriginatingNode)
 

Signals

void frameDecoded (quint32 aCallId, quint32 aSeqNo, const QByteArray &aEncodedData, Hash aOriginatingNode)
 

Public Member Functions

 AudioDecoder (quint32 aSampleRate=8000, quint32 aNumChannels=1)
 
 ~AudioDecoder ()
 

Private Attributes

OpusDecoder * iDecoder
 
QByteArray iDecodedData
 
const quint32 iNumChannels
 
const quint32 iSampleRate
 

Detailed Description

class for de-compressing audio received from network

This class encapsulates opus decoder for packing audio over network.

Constructor & Destructor Documentation

◆ AudioDecoder()

AudioDecoder::AudioDecoder ( quint32  aSampleRate = 8000,
quint32  aNumChannels = 1 
)

Constructor.

◆ ~AudioDecoder()

AudioDecoder::~AudioDecoder ( )

Member Function Documentation

◆ frameDecoded

void AudioDecoder::frameDecoded ( quint32  aCallId,
quint32  aSeqNo,
const QByteArray &  aEncodedData,
Hash  aOriginatingNode 
)
signal

This signal is emitted when decoded frame is ready for further processing, typically by audio mixer.

Parameters
aCallIdcall where frame originates from
aSeqNosequence number of the frame in the call
aEncodedDataraw de-coded audio data. In practice the byte-array holds array of floats, each preseting one sample, in range [-1,1].

◆ frameReceived

void AudioDecoder::frameReceived ( quint32  aCallId,
quint32  aSeqNo,
const QByteArray &  aAudioData,
Hash  aOriginatingNode 
)
slot

Received audio frames to be de-coded are connected to this slot.

Member Data Documentation

◆ iDecodedData

QByteArray AudioDecoder::iDecodedData
private

◆ iDecoder

OpusDecoder* AudioDecoder::iDecoder
private

◆ iNumChannels

const quint32 AudioDecoder::iNumChannels
private

◆ iSampleRate

const quint32 AudioDecoder::iSampleRate
private

The documentation for this class was generated from the following file: