49 auto max = 0, pos = 0;
53 for (i = position; (i < n || isLooping) && (pos < m); i += max)
55 max = jmin (m - pos, n - (i % n));
58 for (;
ch < channels; ++
ch)
61 for (;
ch <
dst.getNumChannels(); ++
ch)
void makeCopyOf(const AudioBuffer< OtherType > &other, bool avoidReallocating=false)
int getNumChannels() const noexcept
int getNumSamples() const noexcept
void setDataToReferTo(Type **dataToReferTo, int newNumChannels, int newStartSample, int newNumSamples)
MemoryAudioSource(AudioBuffer< float > &audioBuffer, bool copyMemory, bool shouldLoop=false)
void prepareToPlay(int samplesPerBlockExpected, double sampleRate) override
void getNextAudioBlock(const AudioSourceChannelInfo &bufferToFill) override
void releaseResources() override