OpenShot Library | libopenshot
0.3.3
|
Go to the documentation of this file.
13 #ifndef OPENSHOT_AUDIOREADERSOURCE_H
14 #define OPENSHOT_AUDIOREADERSOURCE_H
19 #include <AppConfig.h>
20 #include <juce_audio_basics/juce_audio_basics.h>
39 std::shared_ptr<Frame> frame;
40 int64_t sample_position;
81 std::shared_ptr<Frame>
getFrame()
const {
return frame; }
84 void setSpeed(
int new_speed) { speed = new_speed; }
97 void Seek(int64_t new_position) { frame_position = new_position; sample_position=0; }
juce::int64 getNextReadPosition() const
Get the next read position of this source.
void Seek(int64_t new_position)
Seek to a specific frame.
This namespace is the default namespace for all code in the openshot library.
~AudioReaderSource()
Destructor.
void prepareToPlay(int, double)
Prepare to play this audio source.
void setVideoCache(openshot::VideoCacheThread *newCache)
Set playback video cache thread (for pre-roll reference)
void setLooping(bool shouldLoop)
This method is ignored (we do not support looping audio playback)
bool isLooping() const
Looping is not support in OpenShot audio playback (this is always false)
AudioReaderSource(ReaderBase *audio_reader, int64_t starting_frame_number)
The cache thread (for pre-roll checking)
ReaderBase * Reader() const
Get Reader.
juce::int64 getTotalLength() const
Get the total length (in samples) of this audio source.
void setSpeed(int new_speed)
Set Speed (The speed and direction to playback a reader (1=normal, 2=fast, 3=faster,...
Source file for VideoCacheThread class.
void Reader(ReaderBase *audio_reader)
Set Reader.
Header file for ReaderBase class.
void setNextReadPosition(juce::int64 newPosition)
Set the next read position of this source.
std::shared_ptr< Frame > getFrame() const
Return the current frame object.
void getNextAudioBlock(const juce::AudioSourceChannelInfo &info)
Get the next block of audio samples.
This abstract class is the base class, used by all readers in libopenshot.
void releaseResources()
Release all resources.
int getSpeed() const
Get Speed (The speed and direction to playback a reader (1=normal, 2=fast, 3=faster,...
This class is used to expose any ReaderBase derived class as an AudioSource in JUCE.