14 #ifndef OPENSHOT_AUDIO_PLAYBACK_THREAD_H 15 #define OPENSHOT_AUDIO_PLAYBACK_THREAD_H 24 #include <OpenShotAudio.h> 25 #include <AppConfig.h> 26 #include <juce_audio_basics/juce_audio_basics.h> 27 #include <juce_audio_devices/juce_audio_devices.h> 75 juce::AudioSourcePlayer player;
76 juce::AudioTransportSource transport;
77 juce::MixerAudioSource mixer;
81 juce::WaitableEvent play;
83 juce::TimeSliceThread time_thread;
95 std::shared_ptr<openshot::Frame> getFrame();
101 void Seek(int64_t new_position);
110 void setSpeed(
int new_speed) {
if (source) source->
setSpeed(new_speed); }
113 int getSpeed()
const {
if (source)
return source->
getSpeed();
else return 1; }
116 std::string getError()
122 double getDefaultSampleRate()
128 std::vector<std::pair<std::string, std::string>> getAudioDeviceNames()
140 #endif // OPENSHOT_AUDIO_PLAYBACK_THREAD_H static AudioDeviceManagerSingleton * Instance()
Override with default sample rate & channels (44100, 2) and no preferred audio device.
juce::AudioDeviceManager audioDeviceManager
Public device manager property.
Source file for VideoCacheThread class.
void CloseAudioDevice()
Close audio device.
Header file for ReaderBase class.
This class is used to playback a video from a reader.
int getSpeed() const
Get Speed (The speed and direction to playback a reader (1=normal, 2=fast, 3=faster, -1=rewind, etc...)
The audio playback thread.
This abstract class is the base class, used by all readers in libopenshot.
std::string initialise_error
Error found during JUCE initialise method.
The private part of QtPlayer class, which contains an audio thread and video thread, and controls the video timing and audio synchronization code.
double defaultSampleRate
Default sample rate (as detected)
This class is used to expose any ReaderBase derived class as an AudioSource in JUCE.
Header file for AudioReaderSource class.
Header file for Audio Device Info struct.
This namespace is the default namespace for all code in the openshot library.
Header file for RendererBase class.
Singleton wrapper for AudioDeviceManager (to prevent multiple instances).
AudioDeviceList getNames()
A class which probes the available audio devices.
void setSpeed(int new_speed)
Set Speed (The speed and direction to playback a reader (1=normal, 2=fast, 3=faster, -1=rewind, etc...)