OpenShot Audio Library | OpenShotAudio 0.3.2
|
#include <juce_PositionableAudioSource.h>
Public Member Functions | |
~PositionableAudioSource () override=default | |
virtual void | setNextReadPosition (int64 newPosition)=0 |
virtual int64 | getNextReadPosition () const =0 |
virtual int64 | getTotalLength () const =0 |
virtual bool | isLooping () const =0 |
virtual void | setLooping (bool shouldLoop) |
![]() | |
virtual | ~AudioSource ()=default |
virtual void | prepareToPlay (int samplesPerBlockExpected, double sampleRate)=0 |
virtual void | releaseResources ()=0 |
virtual void | getNextAudioBlock (const AudioSourceChannelInfo &bufferToFill)=0 |
Protected Member Functions | |
PositionableAudioSource ()=default | |
![]() | |
AudioSource ()=default | |
A type of AudioSource which can be repositioned.
The basic AudioSource just streams continuously with no idea of a current time or length, so the PositionableAudioSource is used for a finite stream that has a current read position.
Definition at line 38 of file juce_PositionableAudioSource.h.
|
protecteddefault |
Creates the PositionableAudioSource.
|
overridedefault |
Destructor
|
pure virtual |
Returns the position from which the next block will be returned.
Implemented in juce::BufferingAudioSource, juce::AudioTransportSource, and juce::AudioFormatReaderSource.
Referenced by juce::AudioTransportSource::getNextAudioBlock(), and juce::AudioTransportSource::getNextReadPosition().
|
pure virtual |
Returns the total length of the stream (in samples).
Implemented in juce::BufferingAudioSource, juce::AudioTransportSource, and juce::AudioFormatReaderSource.
Referenced by juce::AudioTransportSource::getNextAudioBlock(), juce::BufferingAudioSource::getTotalLength(), and juce::AudioTransportSource::getTotalLength().
Returns true if this source is actually playing in a loop.
Implemented in juce::BufferingAudioSource, juce::AudioTransportSource, and juce::AudioFormatReaderSource.
Referenced by juce::AudioTransportSource::getNextAudioBlock(), juce::BufferingAudioSource::isLooping(), and juce::AudioTransportSource::isLooping().
Tells the source whether you'd like it to play in a loop.
Reimplemented in juce::AudioFormatReaderSource.
Definition at line 73 of file juce_PositionableAudioSource.h.
Tells the stream to move to a new position.
Calling this indicates that the next call to AudioSource::getNextAudioBlock() should return samples from this position.
Note that this may be called on a different thread to getNextAudioBlock(), so the subclass should make sure it's synchronised.
Implemented in juce::BufferingAudioSource, juce::AudioTransportSource, and juce::AudioFormatReaderSource.
Referenced by juce::AudioTransportSource::setNextReadPosition().