Gin
|
FIFO - stuff audio in one end and it pops out the other. More...
Public Member Functions | |
AudioFifo (int channels=2, int numSamples=128) | |
void | setSize (int numChannels, int numSamples) |
int | getNumChannels () const noexcept |
int | getFreeSpace () const noexcept |
int | getNumReady () const noexcept |
void | reset () noexcept |
void | ensureFreeSpace (int numSamples) |
bool | write (const juce::AudioSampleBuffer &src, int numSamples=-1) |
bool | write (const float *const *data, int numSamples) |
bool | writeMono (const float *data, int numSamples) |
bool | read (juce::AudioSampleBuffer &dest) |
bool | read (juce::AudioSampleBuffer &dest, int startSampleInDestBuffer, int numSamples) |
bool | readMono (float *data, int numSamples) |
bool | readAdding (juce::AudioSampleBuffer &dest) |
bool | readAdding (juce::AudioSampleBuffer &dest, int startSampleInDestBuffer, int numSamples) |
FIFO - stuff audio in one end and it pops out the other.
Lock free for single producer / consumer
AudioFifo::AudioFifo | ( | int | channels = 2 , |
int | numSamples = 128 |
||
) |
void AudioFifo::setSize | ( | int | numChannels, |
int | numSamples | ||
) |
|
noexcept |
|
noexcept |
Referenced by ensureFreeSpace(), write(), and writeMono().
|
noexcept |
Referenced by ensureFreeSpace(), read(), readAdding(), readMono(), and ResamplingFifo::samplesReady().
|
noexcept |
void AudioFifo::ensureFreeSpace | ( | int | numSamples | ) |
References getFreeSpace(), and getNumReady().
bool AudioFifo::write | ( | const juce::AudioSampleBuffer & | src, |
int | numSamples = -1 |
||
) |
bool AudioFifo::write | ( | const float *const * | data, |
int | numSamples | ||
) |
References getFreeSpace().
bool AudioFifo::writeMono | ( | const float * | data, |
int | numSamples | ||
) |
References getFreeSpace().
bool AudioFifo::read | ( | juce::AudioSampleBuffer & | dest | ) |
bool AudioFifo::read | ( | juce::AudioSampleBuffer & | dest, |
int | startSampleInDestBuffer, | ||
int | numSamples | ||
) |
References getNumReady().
bool AudioFifo::readMono | ( | float * | data, |
int | numSamples | ||
) |
References getNumReady().
bool AudioFifo::readAdding | ( | juce::AudioSampleBuffer & | dest | ) |
bool AudioFifo::readAdding | ( | juce::AudioSampleBuffer & | dest, |
int | startSampleInDestBuffer, | ||
int | numSamples | ||
) |
References getNumReady().