|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
A type of AudioSource which can be repositioned. More...
#include "juce_PositionableAudioSource.h"
Public Member Functions | |
| ~PositionableAudioSource () override=default | |
| Destructor. | |
| virtual void | setNextReadPosition (int64 newPosition)=0 |
| Tells the stream to move to a new position. | |
| virtual int64 | getNextReadPosition () const =0 |
| Returns the position from which the next block will be returned. | |
| virtual int64 | getTotalLength () const =0 |
| Returns the total length of the stream (in samples). | |
| virtual bool | isLooping () const =0 |
| Returns true if this source is actually playing in a loop. | |
| virtual void | setLooping (bool shouldLoop) |
| Tells the source whether you'd like it to play in a loop. | |
Public Member Functions inherited from juce::AudioSource | |
| virtual | ~AudioSource ()=default |
| Destructor. | |
| virtual void | prepareToPlay (int samplesPerBlockExpected, double sampleRate)=0 |
| Tells the source to prepare for playing. | |
| virtual void | releaseResources ()=0 |
| Allows the source to release anything it no longer needs after playback has stopped. | |
| virtual void | getNextAudioBlock (const AudioSourceChannelInfo &bufferToFill)=0 |
| Called repeatedly to fetch subsequent blocks of audio data. | |
Protected Member Functions | |
| PositionableAudioSource ()=default | |
| Creates the PositionableAudioSource. | |
Protected Member Functions inherited from juce::AudioSource | |
| AudioSource ()=default | |
| Creates an AudioSource. | |
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.
@tags{Audio}
Definition at line 38 of file juce_PositionableAudioSource.h.
Returns the position from which the next block will be returned.
Implemented in juce::BufferingAudioSource, juce::MemoryAudioSource, juce::AudioTransportSource, juce::AudioFormatReaderSource, and juce::AudioBufferSource.
Returns the total length of the stream (in samples).
Implemented in juce::BufferingAudioSource, juce::MemoryAudioSource, juce::AudioTransportSource, juce::AudioFormatReaderSource, and juce::AudioBufferSource.
Returns true if this source is actually playing in a loop.
Implemented in juce::BufferingAudioSource, juce::MemoryAudioSource, juce::AudioTransportSource, juce::AudioFormatReaderSource, and juce::AudioBufferSource.
Tells the source whether you'd like it to play in a loop.
Reimplemented in juce::MemoryAudioSource, juce::AudioFormatReaderSource, and juce::AudioBufferSource.
Definition at line 26 of file juce_PositionableAudioSource.cpp.
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::MemoryAudioSource, juce::AudioTransportSource, juce::AudioFormatReaderSource, and juce::AudioBufferSource.