MythTV  0.26-pre
Public Member Functions
FIFOSamplePipe Class Reference

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

#include <FIFOSamplePipe.h>

Inheritance diagram for FIFOSamplePipe:
FIFOProcessor soundtouch::FIFOSampleBuffer soundtouch::RateTransposer soundtouch::SoundTouch soundtouch::TDStretch RateTransposerFloat RateTransposerInteger soundtouch::TDStretchMMX soundtouch::TDStretchSSE2 soundtouch::TDStretchSSE3

List of all members.

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.

Detailed Description

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

Definition at line 56 of file FIFOSamplePipe.h.


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

Parameters:
samplesPointer to samples.
numSamplesNumber of samples to insert.

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

Referenced by moveSamples().

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:
outputBuffer where to copy output samples.
maxSamplesHow 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.

Parameters:
maxSamplesRemove 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]
virtual void FIFOSamplePipe::clear ( ) [pure virtual]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends