FIFOSamplePipe Class Reference

#include <FIFOSamplePipe.h>

Inheritance diagram for FIFOSamplePipe:

FIFOProcessor soundtouch::FIFOSampleBuffer soundtouch::RateTransposer soundtouch::SoundTouch soundtouch::TDStretch RateTransposerFloat RateTransposerInteger soundtouch::TDStretch3DNow soundtouch::TDStretchMMX soundtouch::TDStretchSSE

List of all members.


Detailed Description

Abstract base class for FIFO (first-in-first-out) sample processing classes.

Definition at line 56 of file FIFOSamplePipe.h.


Public Member Functions

virtual soundtouch::SAMPLETYPEptrBegin () 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.

Constructor & Destructor Documentation

virtual FIFOSamplePipe::~FIFOSamplePipe (  )  [inline, virtual]

Destructor to shut gcc 4 up.

Definition at line 112 of file FIFOSamplePipe.h.


Member Function Documentation

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 soundtouch::FIFOSampleBuffer, and FIFOProcessor.

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.

Parameters:
samples  Pointer to samples.
numSamples  Number of samples to insert.

Implemented in soundtouch::FIFOSampleBuffer, soundtouch::RateTransposer, soundtouch::SoundTouch, and soundtouch::TDStretch.

Referenced by moveSamples().

void FIFOSamplePipe::moveSamples ( FIFOSamplePipe other  )  [inline]

Parameters:
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.

Returns:
Number of samples returned.
Parameters:
output  Buffer where to copy output samples.
maxSamples  How many samples to receive at max.

Implemented in soundtouch::FIFOSampleBuffer, and FIFOProcessor.

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.

Parameters:
maxSamples  Remove this many samples from the beginning of pipe.

Implemented in soundtouch::FIFOSampleBuffer, and FIFOProcessor.

virtual uint FIFOSamplePipe::numSamples (  )  const [pure virtual]

Returns number of samples currently available.

Implemented in soundtouch::FIFOSampleBuffer, and FIFOProcessor.

Referenced by moveSamples(), FIFOProcessor::numSamples(), and soundtouch::SoundTouch::numUnprocessedSamples().

virtual int FIFOSamplePipe::isEmpty (  )  const [pure virtual]

virtual void FIFOSamplePipe::clear (  )  [pure virtual]


The documentation for this class was generated from the following file:

Generated on Sat Dec 18 05:16:03 2010 for MythTV by  doxygen 1.5.5