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

soundtouch::TDStretch Class Reference

#include <TDStretch.h>

Inheritance diagram for soundtouch::TDStretch:

soundtouch::FIFOProcessor soundtouch::FIFOSamplePipe

List of all members.


Detailed Description

Class that does the time-stretch (tempo change) effect for the processed sound.

Definition at line 93 of file TDStretch.h.


Public Member Functions

virtual void clear ()
 Returns nonzero if there aren't any samples available for outputting.
void clearInput ()
 Clears the input buffer.
void enableQuickSeek (BOOL enable)
FIFOSamplePipegetInput ()
 Returns the input buffer object.
FIFOSamplePipegetOutput ()
 Returns the output buffer object.
void getParameters (uint *pSampleRate, uint *pSequenceMs, uint *pSeekWindowMs, uint *pOverlapMs)
virtual int isEmpty () const
 Returns nonzero if there aren't any samples available for outputting.
BOOL isQuickSeekEnabled () const
 Returns nonzero if the quick seeking algorithm is enabled.
void moveSamples (FIFOSamplePipe &other)
virtual uint numSamples () const
 Returns number of samples currently available.
virtual void putSamples (const SAMPLETYPE *samples, uint numSamples)
virtual uint receiveSamples (uint maxSamples)
virtual uint receiveSamples (SAMPLETYPE *outBuffer, uint maxSamples)
void setChannels (uint numChannels)
 Sets the number of channels, 1 = mono, 2 = stereo.
void setParameters (uint sampleRate, uint sequenceMS=DEFAULT_SEQUENCE_MS, uint seekwindowMS=DEFAULT_SEEKWINDOW_MS, uint overlapMS=DEFAULT_OVERLAP_MS)
void setTempo (float newTempo)

Static Public Member Functions

static TDStretchnewInstance ()

Protected Member Functions

void acceptNewOverlapLength (uint newOverlapLength)
 Set new overlap length parameter & reallocate RefMidBuffer if necessary.
virtual LONG_SAMPLETYPE calcCrossCorrMono (const SAMPLETYPE *mixingPos, const SAMPLETYPE *compare) const
virtual LONG_SAMPLETYPE calcCrossCorrStereo (const SAMPLETYPE *mixingPos, const SAMPLETYPE *compare) const
void calculateOverlapLength (uint overlapMs)
 Calculates overlap period length in samples.
virtual void clearCrossCorrState ()
 clear cross correlation routine state if necessary
void clearMidBuffer ()
void overlap (SAMPLETYPE *output, const SAMPLETYPE *input, uint ovlPos) const
virtual void overlapMono (SAMPLETYPE *output, const SAMPLETYPE *input) const
virtual void overlapStereo (SAMPLETYPE *output, const SAMPLETYPE *input) const
void precalcCorrReferenceMono ()
void precalcCorrReferenceStereo ()
void processNominalTempo ()
void processSamples ()
virtual SAMPLETYPE * ptrBegin () const
uint seekBestOverlapPosition (const SAMPLETYPE *refPos)
virtual uint seekBestOverlapPositionMono (const SAMPLETYPE *refPos)
virtual uint seekBestOverlapPositionMonoQuick (const SAMPLETYPE *refPos)
virtual uint seekBestOverlapPositionStereo (const SAMPLETYPE *refPos)
virtual uint seekBestOverlapPositionStereoQuick (const SAMPLETYPE *refPos)
void setOutPipe (FIFOSamplePipe *pOutput)
 Sets output pipe.

Protected Attributes

BOOL bMidBufferDirty
BOOL bQuickseek
uint channels
FIFOSampleBuffer inputBuffer
uint maxOffset
float nominalSkip
FIFOSamplePipeoutput
 Internal pipe where processed samples are put.
FIFOSampleBuffer outputBuffer
uint overlapDividerBits
uint overlapLength
uint overlapMs
SAMPLETYPE * pMidBuffer
SAMPLETYPE * pRefMidBuffer
SAMPLETYPE * pRefMidBufferUnaligned
uint sampleRate
uint sampleReq
uint seekLength
uint seekWindowLength
uint seekWindowMs
uint sequenceMs
float skipFract
uint slopingDivider
float tempo

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

Generated by  Doxygen 1.6.0   Back to index