32#ifndef OPENSHOT_AUDIO_PLAYBACK_THREAD_H
33#define OPENSHOT_AUDIO_PLAYBACK_THREAD_H
35#include "../ReaderBase.h"
36#include "../RendererBase.h"
37#include "../AudioReaderSource.h"
38#include "../AudioDeviceInfo.h"
39#include "../Settings.h"
77 juce::AudioSourcePlayer player;
78 juce::AudioTransportSource transport;
79 juce::MixerAudioSource mixer;
83 juce::WaitableEvent play;
84 juce::WaitableEvent played;
87 juce::TimeSliceThread time_thread;
97 std::shared_ptr<openshot::Frame> getFrame();
100 int64_t getCurrentFramePosition();
106 void Seek(int64_t new_position);
115 void setSpeed(
int new_speed) {
if (source) source->
setSpeed(new_speed); }
118 int getSpeed()
const {
if (source)
return source->
getSpeed();
else return 1; }
121 std::string getError()
127 std::vector<openshot::AudioDeviceInfo> getAudioDeviceNames()
Singleton wrapper for AudioDeviceManager (to prevent multiple instances).
void CloseAudioDevice()
Close audio device.
std::vector< openshot::AudioDeviceInfo > audio_device_names
List of valid audio device names.
static AudioDeviceManagerSingleton * Instance()
Override with no channels and no preferred audio device.
juce::AudioDeviceManager audioDeviceManager
Public device manager property.
std::string initialise_error
Error found during JUCE initialise method.
The audio playback thread.
This class is used to expose any ReaderBase derived class as an AudioSource in JUCE.
int getSpeed() const
Get Speed (The speed and direction to playback a reader (1=normal, 2=fast, 3=faster,...
void setSpeed(int new_speed)
Set Speed (The speed and direction to playback a reader (1=normal, 2=fast, 3=faster,...
The private part of QtPlayer class, which contains an audio thread and video thread,...
This class is used to playback a video from a reader.
This abstract class is the base class, used by all readers in libopenshot.
This namespace is the default namespace for all code in the openshot library.