28 #ifndef OPENSHOT_AUDIOREADERSOURCE_H 29 #define OPENSHOT_AUDIOREADERSOURCE_H 32 #define __JUCE_UNITTEST_JUCEHEADER__ 40 #include "JuceLibraryCode/JuceHeader.h" 60 AudioSampleBuffer *buffer;
64 int64_t original_frame_number;
66 std::shared_ptr<Frame> frame;
67 int64_t frame_position;
68 double estimated_frame;
69 int estimated_samples_per_frame;
72 void GetMoreSamplesFromReader();
75 juce::AudioSampleBuffer* reverse_buffer(juce::AudioSampleBuffer* buffer);
90 void getNextAudioBlock (
const AudioSourceChannelInfo& info);
93 void prepareToPlay(
int,
double);
96 void releaseResources();
100 void setNextReadPosition (int64 newPosition);
103 int64 getNextReadPosition()
const;
106 int64 getTotalLength()
const;
109 bool isLooping()
const;
113 void setLooping (
bool shouldLoop);
116 void setBuffer (AudioSampleBuffer *audio_buffer);
121 std::shared_ptr<Frame>
getFrame()
const {
return frame; }
127 void setSpeed(
int new_speed) { speed = new_speed; }
137 void Seek(int64_t new_position) { frame_number = new_position; estimated_frame = new_position; }
Header file for ReaderBase class.
int getSpeed() const
Get Speed (The speed and direction to playback a reader (1=normal, 2=fast, 3=faster, -1=rewind, etc...)
ReaderBase * Reader() const
Get Reader.
This abstract class is the base class, used by all readers in libopenshot.
std::shared_ptr< Frame > getFrame() const
Return the current frame object.
void Seek(int64_t new_position)
Seek to a specific frame.
This struct contains info about a media file, such as height, width, frames per second, etc...
int64_t getEstimatedFrame() const
Get the estimate frame that is playing at this moment.
void Reader(ReaderBase *audio_reader)
Set Reader.
ReaderInfo info
Information about the current media file.
const ReaderInfo & getReaderInfo() const
This class is used to expose any ReaderBase derived class as an AudioSource in JUCE.
This namespace is the default namespace for all code in the openshot library.
void setSpeed(int new_speed)
Set Speed (The speed and direction to playback a reader (1=normal, 2=fast, 3=faster, -1=rewind, etc...)