37 m_codecInputSize(960),
98 m_address.setAddress(const_cast<QString&>(address));
122 qDebug() <<
"AudioNetSink::setParameters:" 123 <<
" codec: " << codec
124 <<
" stereo: " << stereo
125 <<
" sampleRate: " << sampleRate;
177 qDebug() <<
"AudioNetSink::setNewCodecData: CodecOpus:" 214 qint16& sample = isample;
222 sample = lpSample * 32768.0f;
315 qint8 p = sample / 256;
343 qWarning(
"AudioNetSink::write: CodecOpus mono: unexpected output frame size: %d bytes", nbBytes);
366 qint16& lSample = ilSample;
367 qint16& rSample = irSample;
376 lSample = lpLSample * 32768.0f;
377 rSample = lpRSample * 32768.0f;
453 qWarning(
"AudioNetSink::write: CodecOpus stereo: unexpected output frame size: %d bytes", nbBytes);
470 qint8 pl = lSample / 256;
471 qint8 pr = rSample / 256;
bool selectType(SinkType type)
bool isRTPCapable() const
void setDestination(const QString &address, uint16_t port)
Linear 16 bit samples (no formatting)
PCM Mu-law 8 bit samples.
RTPSink * m_rtpBufferAudio
void setDecimation(uint32_t decimation)
int decimation(float Fin, float Fout)
AudioCompressor m_audioCompressor
static const int m_bitrate
Fixed 64kb/s bitrate (8kB/s)
char m_data[m_dataBlockSize]
void deleteDestination(const QString &address, uint16_t port)
int16_t m_opusIn[m_opusBlockSize]
unsigned int m_bufferIndex
void moveToThread(QThread *thread)
int8_t compress8(int16_t sample)
static const int m_udpBlockSize
int encode(int frameSize, int16_t *in, uint8_t *out)
AudioNetSink(QObject *parent)
without RTP
void setDestination(const QString &address, uint16_t port)
void setEncoder(int32_t fs, int nChannels)
static const int m_dataBlockSize
Opus compressed 8 bit samples at 64kbits/s (8kS/s out). Various input sample rates.
G722 compressed 8 bit samples 16kS/s in 8kS/s out.
void fillALaw()
A-law compression to 8 bits.
void addDestination(const QString &address, uint16_t port)
void fillULaw()
u-law compression to 8 bits
void write(const uint8_t *sampleByte)
void setDecimationFilters()
void write(qint16 sample)
float run(const float &sample)
int encode(uint8_t g722_data[], const int16_t amp[], int len)
float runLP(const float &sample)
uint32_t m_decimationCount
AudioFilter m_audioFilter
void deleteDestination(const QString &address, uint16_t port)
static const int m_opusBlockSize
void setDecimFilters(int srHigh, int srLow, float fcHigh, float fcLow, float gain=1.0f)
void addDestination(const QString &address, uint16_t port)
void setParameters(Codec codec, bool stereo, int sampleRate)
void setPayloadInformation(PayloadType payloadType, int sampleRate)
static const int m_g722BlockSize