OpenShot Library | libopenshot-audio
0.2.0
|
43 int startSampleOffset,
int numSamplesToUse) noexcept
44 : buffer (bufferToUse),
45 startSample (startSampleOffset),
46 numSamples (numSamplesToUse)
55 : buffer (&bufferToUse),
57 numSamples (bufferToUse.getNumSamples())
90 if (buffer !=
nullptr)
91 buffer->
clear (startSample, numSamples);
151 virtual void prepareToPlay (
int samplesPerBlockExpected,
152 double sampleRate) = 0;
166 virtual void releaseResources() = 0;
void clearActiveBufferRegion() const
Convenient method to clear the buffer if the source is not producing any data.
Base class for objects that can produce a continuous stream of audio.
#define JUCE_API
This macro is added to all JUCE public class declarations.
int startSample
The first sample in the buffer from which the callback is expected to write data.
int numSamples
The number of samples in the buffer which the callback is expected to fill with data.
AudioBuffer< float > * buffer
The destination buffer to fill with audio data.
Used by AudioSource::getNextAudioBlock().
AudioSourceChannelInfo(AudioBuffer< float > &bufferToUse) noexcept
Creates an AudioSourceChannelInfo that uses the whole of a buffer.
AudioSourceChannelInfo(AudioBuffer< float > *bufferToUse, int startSampleOffset, int numSamplesToUse) noexcept
Creates an AudioSourceChannelInfo.
void clear() noexcept
Clears all the samples in all channels.