|
MythTV
0.26-pre
|
Abstract base class for FIFO (first-in-first-out) sample processing classes. More...
#include <FIFOSamplePipe.h>
Public Member Functions | |
| virtual soundtouch::SAMPLETYPE * | ptrBegin () const =0 |
| Returns a pointer to the beginning of the output samples. | |
| virtual void | putSamples (const soundtouch::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 (soundtouch::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 | ~FIFOSamplePipe () |
| Destructor to shut gcc 4 up. | |
Abstract base class for FIFO (first-in-first-out) sample processing classes.
Definition at line 56 of file FIFOSamplePipe.h.
| virtual FIFOSamplePipe::~FIFOSamplePipe | ( | ) | [inline, virtual] |
Destructor to shut gcc 4 up.
Definition at line 112 of file FIFOSamplePipe.h.
| virtual soundtouch::SAMPLETYPE* FIFOSamplePipe::ptrBegin | ( | ) | const [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 FIFOProcessor, and soundtouch::FIFOSampleBuffer.
Referenced by moveSamples(), and FIFOProcessor::ptrBegin().
| virtual void FIFOSamplePipe::putSamples | ( | const soundtouch::SAMPLETYPE * | samples, |
| uint | numSamples | ||
| ) | [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 soundtouch::TDStretch, soundtouch::SoundTouch, soundtouch::RateTransposer, and soundtouch::FIFOSampleBuffer.
Referenced by moveSamples().
| void FIFOSamplePipe::moveSamples | ( | FIFOSamplePipe & | other | ) | [inline] |
| other | Other pipe instance where from the receive the data. |
Definition at line 76 of file FIFOSamplePipe.h.
Referenced by soundtouch::SoundTouch::calcEffectiveRateAndTempo(), soundtouch::RateTransposer::flushStoreBuffer(), soundtouch::TDStretch::processNominalTempo(), and soundtouch::SoundTouch::putSamples().
| virtual uint FIFOSamplePipe::receiveSamples | ( | soundtouch::SAMPLETYPE * | output, |
| uint | maxSamples | ||
| ) | [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 FIFOProcessor, and soundtouch::FIFOSampleBuffer.
Referenced by moveSamples(), and FIFOProcessor::receiveSamples().
| virtual uint FIFOSamplePipe::receiveSamples | ( | uint | maxSamples | ) | [pure virtual] |
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 FIFOProcessor, and soundtouch::FIFOSampleBuffer.
| virtual uint FIFOSamplePipe::numSamples | ( | ) | const [pure virtual] |
Returns number of samples currently available.
Implemented in FIFOProcessor, and soundtouch::FIFOSampleBuffer.
Referenced by moveSamples(), FIFOProcessor::numSamples(), and soundtouch::SoundTouch::numUnprocessedSamples().
| virtual int FIFOSamplePipe::isEmpty | ( | ) | const [pure virtual] |
Implemented in FIFOProcessor, soundtouch::FIFOSampleBuffer, and soundtouch::RateTransposer.
Referenced by FIFOProcessor::isEmpty().
| virtual void FIFOSamplePipe::clear | ( | ) | [pure virtual] |
Clears all the samples.
Implemented in soundtouch::SoundTouch, soundtouch::TDStretch, soundtouch::FIFOSampleBuffer, and soundtouch::RateTransposer.
1.7.6.1