OpenShot Library | libopenshot-audio
0.2.0
|
63 bool deleteSourceWhenDeleted,
64 int numberOfSamplesToBuffer,
65 int numberOfChannels = 2,
66 bool prefillBufferOnPrepareToPlay =
true);
77 void prepareToPlay (
int samplesPerBlockExpected,
double sampleRate)
override;
80 void releaseResources()
override;
87 void setNextReadPosition (int64 newPosition)
override;
90 int64 getNextReadPosition()
const override;
108 int numberOfSamplesToBuffer, numberOfChannels;
112 std::atomic<int64> bufferValidStart { 0 }, bufferValidEnd { 0 }, nextPlayPos { 0 };
113 double sampleRate = 0;
114 bool wasSourceLooping =
false, isPrepared =
false, prefillBuffer;
116 bool readNextBufferChunk();
117 void readBufferSection (int64 start,
int length,
int bufferOffset);
118 int useTimeSlice()
override;
120 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BufferingAudioSource)
virtual int64 getTotalLength() const =0
Returns the total length of the stream (in samples).
A type of AudioSource which can be repositioned.
#define JUCE_API
This macro is added to all JUCE public class declarations.
bool isLooping() const override
Implements the PositionableAudioSource method.
Used by the TimeSliceThread class.
int64 getTotalLength() const override
Implements the PositionableAudioSource method.
A thread that keeps a list of clients, and calls each one in turn, giving them all a chance to run so...
Used by AudioSource::getNextAudioBlock().
Holds a pointer to an object which can optionally be deleted when this pointer goes out of scope.
virtual bool isLooping() const =0
Returns true if this source is actually playing in a loop.
An AudioSource which takes another source as input, and buffers it using a thread.
Allows threads to wait for events triggered by other threads.