|
TracktionEngine
|
Base-class for sound processing routines working in FIFO principle. More...
#include <tracktion_TempoDetect.h>
Public Member Functions | |
| virtual uint | receiveSamples (SAMPLETYPE *outBuffer, uint maxSamples) |
| Output samples from beginning of the sample buffer. | |
| virtual uint | receiveSamples (uint maxSamples) |
| 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 |
| Returns number of samples currently available. | |
| virtual int | isEmpty () const |
| Returns nonzero if there aren't any samples available for outputting. | |
| virtual uint | adjustAmountOfSamples (uint numSamples) |
| allow trimming (downwards) amount of samples in pipeline. | |
| Public Member Functions inherited from engine::soundtouch::FIFOSamplePipe | |
| virtual | ~FIFOSamplePipe () |
| 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 void | clear ()=0 |
| Clears all the samples. | |
Protected Member Functions | |
| void | setOutPipe (FIFOSamplePipe *pOutput) |
| Sets output pipe. | |
| FIFOProcessor () | |
| Constructor. | |
| FIFOProcessor (FIFOSamplePipe *pOutput) | |
| Constructor. Configures output pipe. | |
| virtual | ~FIFOProcessor () |
| Destructor. | |
| virtual SAMPLETYPE * | ptrBegin () |
| Returns a pointer to the beginning of the output samples. | |
| Protected Member Functions inherited from engine::soundtouch::FIFOSamplePipe | |
| bool | verifyNumberOfChannels (int nChannels) const |
Protected Attributes | |
| FIFOSamplePipe * | output |
| Internal pipe where processed samples are put. | |
Base-class for sound processing routines working in FIFO principle.
With this base class it's easy to implement sound processing stages that can be chained together, so that samples that are fed into beginning of the pipe automatically go through all the processing stages.
When samples are input to this class, they're first processed and then put to the FIFO pipe that's defined as output of this class. This output pipe can be either other processing stage or a FIFO sample buffer.
|
protected |
Constructor.
Doesn't define output pipe; it has to be set be 'setOutPipe' function.
|
protected |
Constructor. Configures output pipe.
| pOutput | Output pipe. |
|
protectedvirtual |
Destructor.
|
protected |
Sets output pipe.
|
protectedvirtual |
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
Implements engine::soundtouch::FIFOSamplePipe.
|
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.
| outBuffer | Buffer where to copy output samples. |
| maxSamples | How many samples to receive at max. |
Implements engine::soundtouch::FIFOSamplePipe.
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. |
Implements engine::soundtouch::FIFOSamplePipe.
|
virtual |
Returns number of samples currently available.
Implements engine::soundtouch::FIFOSamplePipe.
|
virtual |
Returns nonzero if there aren't any samples available for outputting.
Implements engine::soundtouch::FIFOSamplePipe.
allow trimming (downwards) amount of samples in pipeline.
Returns adjusted amount of samples
Implements engine::soundtouch::FIFOSamplePipe.
|
protected |
Internal pipe where processed samples are put.