openshot-audio
0.1.5
|
#include <juce_BufferingAudioSource.h>
Public Member Functions | |
BufferingAudioSource (PositionableAudioSource *source, TimeSliceThread &backgroundThread, bool deleteSourceWhenDeleted, int numberOfSamplesToBuffer, int numberOfChannels=2) | |
~BufferingAudioSource () | |
void | prepareToPlay (int samplesPerBlockExpected, double sampleRate) override |
void | releaseResources () override |
void | getNextAudioBlock (const AudioSourceChannelInfo &) override |
void | setNextReadPosition (int64 newPosition) override |
int64 | getNextReadPosition () const override |
int64 | getTotalLength () const override |
bool | isLooping () const override |
![]() | |
~PositionableAudioSource () | |
virtual void | setLooping (bool shouldLoop) |
![]() | |
virtual | ~AudioSource () |
Additional Inherited Members | |
![]() | |
PositionableAudioSource () noexcept | |
![]() | |
AudioSource () noexcept | |
An AudioSource which takes another source as input, and buffers it using a thread.
Create this as a wrapper around another thread, and it will read-ahead with a background thread to smooth out playback. You can either create one of these directly, or use it indirectly using an AudioTransportSource.
BufferingAudioSource::BufferingAudioSource | ( | PositionableAudioSource * | source, |
TimeSliceThread & | backgroundThread, | ||
bool | deleteSourceWhenDeleted, | ||
int | numberOfSamplesToBuffer, | ||
int | numberOfChannels = 2 |
||
) |
Creates a BufferingAudioSource.
source | the input source to read from |
backgroundThread | a background thread that will be used for the background read-ahead. This object must not be deleted until after any BufferedAudioSources that are using it have been deleted! |
deleteSourceWhenDeleted | if true, then the input source object will be deleted when this object is deleted |
numberOfSamplesToBuffer | the size of buffer to use for reading ahead |
numberOfChannels | the number of channels that will be played |
BufferingAudioSource::~BufferingAudioSource | ( | ) |
Destructor.
The input source may be deleted depending on whether the deleteSourceWhenDeleted flag was set in the constructor.
|
overridevirtual |
Implementation of the AudioSource method.
Implements AudioSource.
|
overridevirtual |
Implements the PositionableAudioSource method.
Implements PositionableAudioSource.
|
inlineoverridevirtual |
Implements the PositionableAudioSource method.
Implements PositionableAudioSource.
|
inlineoverridevirtual |
Implements the PositionableAudioSource method.
Implements PositionableAudioSource.
|
overridevirtual |
Implementation of the AudioSource method.
Implements AudioSource.
|
overridevirtual |
Implementation of the AudioSource method.
Implements AudioSource.
|
overridevirtual |
Implements the PositionableAudioSource method.
Implements PositionableAudioSource.