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 <audiofifo.h>
Inherits QObject.
Public Member Functions | |
AudioFifo () | |
AudioFifo (uint32_t numSamples) | |
~AudioFifo () | |
bool | setSize (uint32_t numSamples) |
uint32_t | write (const quint8 *data, uint32_t numSamples) |
uint32_t | read (quint8 *data, uint32_t numSamples) |
uint32_t | drain (uint32_t numSamples) |
void | clear () |
uint32_t | flush () |
uint32_t | fill () const |
bool | isEmpty () const |
bool | isFull () const |
uint32_t | size () const |
Private Member Functions | |
bool | create (uint32_t numSamples) |
Private Attributes | |
QMutex | m_mutex |
qint8 * | m_fifo |
const uint32_t | m_sampleSize |
uint32_t | m_size |
uint32_t | m_fill |
uint32_t | m_head |
uint32_t | m_tail |
Definition at line 29 of file audiofifo.h.
AudioFifo::AudioFifo | ( | ) |
Definition at line 27 of file audiofifo.cpp.
References m_fill, m_head, m_size, and m_tail.
AudioFifo::AudioFifo | ( | uint32_t | numSamples | ) |
Definition at line 37 of file audiofifo.cpp.
References create(), and m_mutex.
AudioFifo::~AudioFifo | ( | ) |
void AudioFifo::clear | ( | ) |
Definition at line 156 of file audiofifo.cpp.
References m_fill, m_head, m_mutex, and m_tail.
Referenced by AMDemod::processOneSample(), AMMod::processOneSample(), NFMMod::processOneSample(), SSBMod::processOneSample(), AMDemod::start(), WFMDemod::start(), DSDDemod::start(), NFMDemod::start(), BFMDemod::start(), DATVDemod::start(), AMMod::start(), WFMMod::start(), NFMMod::start(), SSBMod::start(), and FreeDVMod::start().
|
private |
Definition at line 165 of file audiofifo.cpp.
References m_fifo, m_fill, m_head, m_sampleSize, m_size, and m_tail.
Referenced by AudioFifo(), and setSize().
uint AudioFifo::drain | ( | uint32_t | numSamples | ) |
|
inline |
Definition at line 45 of file audiofifo.h.
|
inline |
Definition at line 44 of file audiofifo.h.
|
inline |
Definition at line 46 of file audiofifo.h.
Referenced by read().
|
inline |
Definition at line 47 of file audiofifo.h.
Referenced by write().
uint AudioFifo::read | ( | quint8 * | data, |
uint32_t | numSamples | ||
) |
Definition at line 103 of file audiofifo.cpp.
References isEmpty(), m_fifo, m_fill, m_head, m_mutex, m_sampleSize, m_size, and MIN.
Referenced by AMMod::pullAudio(), WFMMod::pullAudio(), NFMMod::pullAudio(), SSBMod::pullAudio(), FreeDVMod::pullAudio(), FCDProThread::work(), and FCDProPlusThread::work().
bool AudioFifo::setSize | ( | uint32_t | numSamples | ) |
Definition at line 59 of file audiofifo.cpp.
References create(), and m_mutex.
Referenced by AMDemod::applyAudioSampleRate(), SSBDemod::applyAudioSampleRate(), and FreeDVDemod::applyAudioSampleRate().
|
inline |
Definition at line 48 of file audiofifo.h.
uint AudioFifo::write | ( | const quint8 * | data, |
uint32_t | numSamples | ||
) |
Definition at line 66 of file audiofifo.cpp.
References isFull(), m_fifo, m_fill, m_mutex, m_sampleSize, m_size, m_tail, and MIN.
Referenced by UDPSink::audioReadyRead(), AMDemod::feed(), WFMDemod::feed(), DSDDemod::feed(), BFMDemod::feed(), FreeDVDemod::feed(), AMBEWorker::handleInputMessages(), AMDemod::processOneSample(), NFMDemod::processOneSample(), AMMod::processOneSample(), NFMMod::processOneSample(), SSBDemod::processOneSample(), SSBMod::processOneSample(), FreeDVDemod::pushSampleToAudio(), and DATVideoRender::RenderStream().
|
private |
Definition at line 53 of file audiofifo.h.
Referenced by create(), read(), write(), and ~AudioFifo().
|
private |
Definition at line 58 of file audiofifo.h.
Referenced by AudioFifo(), clear(), create(), drain(), read(), and write().
|
private |
Definition at line 59 of file audiofifo.h.
Referenced by AudioFifo(), clear(), create(), drain(), and read().
|
private |
Definition at line 51 of file audiofifo.h.
Referenced by AudioFifo(), clear(), drain(), read(), setSize(), write(), and ~AudioFifo().
|
private |
Definition at line 55 of file audiofifo.h.
|
private |
Definition at line 57 of file audiofifo.h.
Referenced by AudioFifo(), create(), drain(), read(), write(), and ~AudioFifo().
|
private |
Definition at line 60 of file audiofifo.h.
Referenced by AudioFifo(), clear(), create(), and write().