Logo Search packages:      
Sourcecode: ardour version File versions  Download package

soundtouch::RateTransposer Class Reference

#include <RateTransposer.h>

Inheritance diagram for soundtouch::RateTransposer:

soundtouch::FIFOProcessor soundtouch::FIFOSamplePipe RateTransposerFloat RateTransposerInteger

List of all members.


Detailed Description

A common linear samplerate transposer class.

Note: Use function "RateTransposer::newInstance()" to create a new class instance instead of the "new" operator; that function automatically chooses a correct implementation depending on if integer or floating arithmetics are to be used.

Definition at line 63 of file RateTransposer.h.


Public Member Functions

void clear ()
 Clears all the samples in the object.
void enableAAFilter (BOOL newMode)
 Enables/disables the anti-alias filter. Zero to disable, nonzero to enable.
AAFilter * getAAFilter () const
 Return anti-alias filter object.
FIFOSamplePipegetOutput ()
 Returns the output buffer object.
FIFOSamplePipegetStore ()
 Returns the store buffer object.
BOOL isAAFilterEnabled () const
 Returns nonzero if anti-alias filter is enabled.
virtual int isEmpty () const
 Returns nonzero if there aren't any samples available for outputting.
uint isEmpty ()
 Returns nonzero if there aren't any samples available for outputting.
void moveSamples (FIFOSamplePipe &other)
virtual uint numSamples () const
 Returns number of samples currently available.
void putSamples (const SAMPLETYPE *samples, uint numSamples)
virtual uint receiveSamples (uint maxSamples)
virtual uint receiveSamples (SAMPLETYPE *outBuffer, uint maxSamples)
void setChannels (uint channels)
 Sets the number of channels, 1 = mono, 2 = stereo.
virtual void setRate (float newRate)

Static Public Member Functions

static RateTransposernewInstance ()

Protected Member Functions

void downsample (const SAMPLETYPE *src, uint numSamples)
void flushStoreBuffer ()
void init ()
void processSamples (const SAMPLETYPE *src, uint numSamples)
virtual SAMPLETYPE * ptrBegin () const
virtual void resetRegisters ()=0
void setOutPipe (FIFOSamplePipe *pOutput)
 Sets output pipe.
uint transpose (SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples)
virtual uint transposeMono (SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples)=0
virtual uint transposeStereo (SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples)=0
void upsample (const SAMPLETYPE *src, uint numSamples)

Protected Attributes

BOOL bUseAAFilter
float fRate
FIFOSamplePipeoutput
 Internal pipe where processed samples are put.
FIFOSampleBuffer outputBuffer
 Output sample buffer.
AAFilter * pAAFilter
 Anti-alias filter object.
FIFOSampleBuffer storeBuffer
FIFOSampleBuffer tempBuffer
 Buffer for keeping samples between transposing & anti-alias filter.
uint uChannels

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

Generated by  Doxygen 1.6.0   Back to index