SDRAngel
4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
|
#include <audiooutput.h>
Inherits QIODevice.
Public Types | |
enum | UDPChannelMode { UDPChannelLeft, UDPChannelRight, UDPChannelMixed, UDPChannelStereo } |
enum | UDPChannelCodec { UDPCodecL16, UDPCodecL8, UDPCodecALaw, UDPCodecULaw, UDPCodecG722, UDPCodecOpus } |
Public Member Functions | |
AudioOutput () | |
virtual | ~AudioOutput () |
bool | start (int device, int rate) |
void | stop () |
void | addFifo (AudioFifo *audioFifo) |
void | removeFifo (AudioFifo *audioFifo) |
int | getNbFifos () const |
unsigned int | getRate () const |
void | setOnExit (bool onExit) |
void | setUdpDestination (const QString &address, uint16_t port) |
void | setUdpCopyToUDP (bool copyToUDP) |
void | setUdpUseRTP (bool useRTP) |
void | setUdpChannelMode (UDPChannelMode udpChannelMode) |
void | setUdpChannelFormat (UDPChannelCodec udpChannelCodec, bool stereo, int sampleRate) |
void | setUdpDecimation (uint32_t decimation) |
Private Member Functions | |
virtual qint64 | readData (char *data, qint64 maxLen) |
virtual qint64 | writeData (const char *data, qint64 len) |
Private Attributes | |
QMutex | m_mutex |
QAudioOutput * | m_audioOutput |
AudioNetSink * | m_audioNetSink |
bool | m_copyAudioToUdp |
UDPChannelMode | m_udpChannelMode |
UDPChannelCodec | m_udpChannelCodec |
uint | m_audioUsageCount |
bool | m_onExit |
std::list< AudioFifo * > | m_audioFifos |
std::vector< qint32 > | m_mixBuffer |
QAudioFormat | m_audioFormat |
Friends | |
class | AudioOutputPipe |
Definition at line 35 of file audiooutput.h.
Enumerator | |
---|---|
UDPCodecL16 | Linear 16 bit (no codec) |
UDPCodecL8 | Linear 8 bit. |
UDPCodecALaw | PCM A-law 8 bit. |
UDPCodecULaw | PCM Mu-law 8 bit. |
UDPCodecG722 | G722 compression. |
UDPCodecOpus | Opus compression. |
Definition at line 45 of file audiooutput.h.
Enumerator | |
---|---|
UDPChannelLeft | |
UDPChannelRight | |
UDPChannelMixed | |
UDPChannelStereo |
Definition at line 37 of file audiooutput.h.
AudioOutput::AudioOutput | ( | ) |
Definition at line 27 of file audiooutput.cpp.
|
virtual |
Definition at line 40 of file audiooutput.cpp.
void AudioOutput::addFifo | ( | AudioFifo * | audioFifo | ) |
|
inline |
Definition at line 63 of file audiooutput.h.
|
inline |
Definition at line 65 of file audiooutput.h.
Referenced by AudioDeviceManager::setOutputDeviceInfo().
|
privatevirtual |
Definition at line 221 of file audiooutput.cpp.
References i, m_audioFifos, m_audioNetSink, m_copyAudioToUdp, m_mixBuffer, m_udpChannelMode, UDPChannelLeft, UDPChannelMixed, UDPChannelRight, UDPChannelStereo, and AudioNetSink::write().
void AudioOutput::removeFifo | ( | AudioFifo * | audioFifo | ) |
|
inline |
Definition at line 66 of file audiooutput.h.
References decimation().
void AudioOutput::setUdpChannelFormat | ( | UDPChannelCodec | udpChannelCodec, |
bool | stereo, | ||
int | sampleRate | ||
) |
Definition at line 205 of file audiooutput.cpp.
References m_audioNetSink, m_udpChannelCodec, and AudioNetSink::setParameters().
Referenced by AudioDeviceManager::setOutputDeviceInfo().
void AudioOutput::setUdpChannelMode | ( | UDPChannelMode | udpChannelMode | ) |
Definition at line 200 of file audiooutput.cpp.
References m_udpChannelMode.
Referenced by AudioDeviceManager::setOutputDeviceInfo().
void AudioOutput::setUdpCopyToUDP | ( | bool | copyToUDP | ) |
Definition at line 188 of file audiooutput.cpp.
References m_copyAudioToUdp.
Referenced by AudioDeviceManager::setOutputDeviceInfo().
void AudioOutput::setUdpDecimation | ( | uint32_t | decimation | ) |
Definition at line 214 of file audiooutput.cpp.
References m_audioNetSink, and AudioNetSink::setDecimation().
Referenced by AudioDeviceManager::setOutputDeviceInfo().
void AudioOutput::setUdpDestination | ( | const QString & | address, |
uint16_t | port | ||
) |
Definition at line 181 of file audiooutput.cpp.
References m_audioNetSink, and AudioNetSink::setDestination().
Referenced by AudioDeviceManager::setOutputDeviceInfo().
void AudioOutput::setUdpUseRTP | ( | bool | useRTP | ) |
Definition at line 193 of file audiooutput.cpp.
References m_audioNetSink, AudioNetSink::selectType(), AudioNetSink::SinkRTP, and AudioNetSink::SinkUDP.
Referenced by AudioDeviceManager::setOutputDeviceInfo().
bool AudioOutput::start | ( | int | device, |
int | rate | ||
) |
Definition at line 54 of file audiooutput.cpp.
References m_audioFormat, m_audioNetSink, m_audioOutput, and m_mutex.
Referenced by AudioDeviceManager::setOutputDeviceInfo().
void AudioOutput::stop | ( | ) |
Definition at line 133 of file audiooutput.cpp.
References m_audioNetSink, m_audioOutput, and m_mutex.
Referenced by AudioDeviceManager::setOutputDeviceInfo().
|
privatevirtual |
Definition at line 338 of file audiooutput.cpp.
|
friend |
Definition at line 94 of file audiooutput.h.
|
private |
Definition at line 85 of file audiooutput.h.
Referenced by addFifo(), readData(), and removeFifo().
|
private |
Definition at line 88 of file audiooutput.h.
Referenced by start().
|
private |
Definition at line 78 of file audiooutput.h.
Referenced by readData(), setUdpChannelFormat(), setUdpDecimation(), setUdpDestination(), setUdpUseRTP(), start(), and stop().
|
private |
Definition at line 77 of file audiooutput.h.
|
private |
Definition at line 82 of file audiooutput.h.
|
private |
Definition at line 79 of file audiooutput.h.
Referenced by readData(), and setUdpCopyToUDP().
|
private |
Definition at line 86 of file audiooutput.h.
Referenced by readData().
|
private |
Definition at line 76 of file audiooutput.h.
Referenced by addFifo(), removeFifo(), start(), and stop().
|
private |
Definition at line 83 of file audiooutput.h.
|
private |
Definition at line 81 of file audiooutput.h.
Referenced by setUdpChannelFormat().
|
private |
Definition at line 80 of file audiooutput.h.
Referenced by readData(), and setUdpChannelMode().