43 void initialise (
double sourceSampleRate,
int samplesPerBlock,
44 int numChannels, TimeStretcher::Mode, TimeStretcher::ElastiqueProOptions,
48 bool isInitialised()
const;
57 bool setSpeedAndPitch (
float speedRatio,
float semitones);
62 int getMaxFramesNeeded()
const;
67 int getFramesNeeded()
const;
72 int getFramesRecomended()
const;
75 bool requiresMoreFrames()
const;
78 int getFreeSpace()
const;
84 int pushData (
const float*
const* inChannels,
int numSamples);
89 int getNumReady()
const;
95 int popData (
float*
const* outChannels,
int numSamples);
105 int flush (
float*
const* outChannels);
135 AudioFifo inputFifo { 1, 32 }, outputFifo { 1, 32 };
136 mutable TimeStretcher stretcher;
137 const int numBlocksToReadAhead;
138 int numChannels = 0, numSamplesPerOutputBlock = 0;
143 mutable std::atomic<bool> newSpeedAndPitchPending {
false }, hasBeenReset {
true };
147 void tryToSetNewSpeedAndPitch()
const;
148 int processNextBlock (
bool shouldBlock);
149 bool canProcessNextBlock();