|
TracktionEngine
|
Abstract base class for FIFO (first-in-first-out) sample processing classes. More...
#include <tracktion_TempoDetect.h>
Public Member Functions | |
| virtual | ~FIFOSamplePipe () |
| virtual SAMPLETYPE * | ptrBegin ()=0 |
| Returns a pointer to the beginning of the output samples. | |
| virtual void | putSamples (const SAMPLETYPE *samples, uint numSamples)=0 |
| Adds 'numSamples' pcs of samples from the 'samples' memory position to the sample buffer. | |
| void | moveSamples (FIFOSamplePipe &other) |
| virtual uint | receiveSamples (SAMPLETYPE *output, uint maxSamples)=0 |
| Output samples from beginning of the sample buffer. | |
| virtual uint | receiveSamples (uint maxSamples)=0 |
| Adjusts book-keeping so that given number of samples are removed from beginning of the sample buffer without copying them anywhere. | |
| virtual uint | numSamples () const =0 |
| Returns number of samples currently available. | |
| virtual int | isEmpty () const =0 |
| virtual void | clear ()=0 |
| Clears all the samples. | |
| virtual uint | adjustAmountOfSamples (uint numSamples)=0 |
| allow trimming (downwards) amount of samples in pipeline. | |
Protected Member Functions | |
| bool | verifyNumberOfChannels (int nChannels) const |
Abstract base class for FIFO (first-in-first-out) sample processing classes.
|
virtual |
|
protected |
References engine::TempoDetect::TempoDetect().
|
pure virtual |
Returns a pointer to the beginning of the output samples.
This function is provided for accessing the output samples directly. Please be careful for not to corrupt the book-keeping!
When using this function to output samples, also remember to 'remove' the output samples from the buffer by calling the 'receiveSamples(numSamples)' function
Implemented in engine::soundtouch::FIFOProcessor, and engine::soundtouch::FIFOSampleBuffer.
|
pure virtual |
Adds 'numSamples' pcs of samples from the 'samples' memory position to the sample buffer.
| samples | Pointer to samples. |
| numSamples | Number of samples to insert. |
Implemented in engine::soundtouch::FIFOSampleBuffer.
| void engine::soundtouch::FIFOSamplePipe::moveSamples | ( | FIFOSamplePipe & | other | ) |
| other | Other pipe instance where from the receive the data. |
|
pure virtual |
Output samples from beginning of the sample buffer.
Copies requested samples to output buffer and removes them from the sample buffer. If there are less than 'numsample' samples in the buffer, returns all that available.
| output | Buffer where to copy output samples. |
| maxSamples | How many samples to receive at max. |
Implemented in engine::soundtouch::FIFOProcessor, and engine::soundtouch::FIFOSampleBuffer.
Adjusts book-keeping so that given number of samples are removed from beginning of the sample buffer without copying them anywhere.
Used to reduce the number of samples in the buffer when accessing the sample buffer directly with 'ptrBegin' function.
| maxSamples | Remove this many samples from the beginning of pipe. |
Implemented in engine::soundtouch::FIFOProcessor, and engine::soundtouch::FIFOSampleBuffer.
|
pure virtual |
Returns number of samples currently available.
Implemented in engine::soundtouch::FIFOProcessor, and engine::soundtouch::FIFOSampleBuffer.
Referenced by adjustAmountOfSamples().
|
pure virtual |
Implemented in engine::soundtouch::FIFOProcessor, and engine::soundtouch::FIFOSampleBuffer.
|
pure virtual |
Clears all the samples.
Implemented in engine::soundtouch::FIFOSampleBuffer.
|
pure virtual |
allow trimming (downwards) amount of samples in pipeline.
Returns adjusted amount of samples
Implemented in engine::soundtouch::FIFOProcessor, and engine::soundtouch::FIFOSampleBuffer.
References numSamples().