26 #include "libardour-config.h"
37 #include <glibmm/threads.h>
61 struct AudioBackendInfo;
74 std::shared_ptr<AudioBackend>
set_backend (
const std::string&,
const std::string& arg1,
const std::string& arg2);
87 int start (
bool for_latency_measurement=
false);
88 int stop (
bool for_latency_measurement=
false);
138 return set_buffer_size (samples);
149 virtual const char *
what()
const throw() {
return "could not connect to engine backend"; }
324 uint32_t _silence_hit_cnt;
virtual const char * what() const
int usecs_per_cycle() const
std::atomic< int > _stop_hw_reset_processing
void request_device_list_update()
PBD::Signal< void(pframes_t)> Freewheel
PBD::Signal< void(samplecnt_t)> SampleRateChanged
void timebase_callback(TransportState state, pframes_t nframes, samplepos_t pos, int new_position)
int set_systemic_output_latency(uint32_t)
uint32_t latency_signal_delay() const
void freewheel_callback(bool)
void halted_callback(const char *reason)
Glib::Threads::Cond session_removed
sampleoffset_t session_removal_countdown
std::string _last_backend_error_string
samplepos_t sample_time_at_cycle_start()
int backend_reset_requested()
std::string get_last_backend_error() const
PBD::Signal< void()> DeviceResetFinished
bool is_reset_requested() const
static bool thread_initialised_for_audio_processing()
Session * session() const
PBD::Signal< void(uint32_t)> Running
PBD::Signal< void()> DeviceResetStarted
PBD::Signal< void(const char *)> Halted
int request_buffer_size(pframes_t samples)
Glib::Threads::Mutex & process_lock()
float get_dsp_load() const
std::vector< const AudioBackendInfo * > available_backends() const
size_t raw_buffer_size(DataType t)
std::string backend_id(bool for_input)
int start_latency_detection(bool)
static AudioEngine * instance()
bool _started_for_latency
int set_sample_rate(float)
std::shared_ptr< AudioBackend > current_backend() const
uint32_t process_thread_count()
static void thread_init_callback(void *)
static AudioEngine * _instance
PortEngine::PortPtr _latency_input_port
int port_registration_callback()
PortEngine::PortPtr _latency_output_port
PBD::Signal< void()> Stopped
samplecnt_t _processed_samples
the number of samples processed since start() was called
LatencyMeasurement measuring_latency() const
int set_device_name(const std::string &)
bool get_sync_offset(pframes_t &offset) const
samplecnt_t monitor_check_interval
number of samples between each check for changes in monitor input
PBD::Signal< void()> BecameSilent
PBD::Signal< void()> DeviceError
std::map< std::string, AudioBackendInfo * > BackendMap
void start_hw_event_processing()
TransportState transport_state()
samplecnt_t _latency_flush_samples
Glib::Threads::Mutex _devicelist_update_lock
ProcessThread * main_thread() const
void set_latency_output_port(const std::string &)
void split_cycle(pframes_t offset)
int join_process_threads()
int create_process_thread(std::function< void()> func)
void launch_device_control_app()
PBD::Thread * _hw_devicelist_update_thread
std::atomic< int > _hw_devicelist_update_count
gain_t session_removal_gain_step
int set_interleaved(bool yn)
void reset_silence_countdown()
std::string current_backend_name() const
samplepos_t sample_time()
bool freewheeling() const
int set_buffer_size(uint32_t)
int buffer_size_change(pframes_t nframes)
LatencyMeasurement _measuring_latency
samplecnt_t last_monitor_check
time of the last monitor check in samples
void latency_callback(bool for_playback)
bool session_remove_pending
samplepos_t transport_sample()
std::atomic< int > _pending_capture_latency_callback
void queue_latency_update(bool)
samplecnt_t processed_samples() const
int sample_rate_change(pframes_t nframes)
pframes_t samples_per_cycle() const
std::shared_ptr< AudioBackend > set_backend(const std::string &, const std::string &arg1, const std::string &arg2)
ProcessThread * _main_thread
void transport_locate(samplepos_t pos)
void set_session(Session *)
Glib::Threads::RecMutex _state_lock
static AudioEngine * create()
std::string _latency_input_name
int process_callback(pframes_t nframes)
int set_systemic_input_latency(uint32_t)
PBD::Signal< void()> DeviceListChanged
Glib::Threads::Cond _hw_reset_condition
std::string _latency_output_name
PBD::Signal< void()> Xrun
Glib::Threads::Mutex & latency_lock()
pframes_t samples_since_cycle_start()
void do_devicelist_update()
samplecnt_t sample_rate() const
Glib::Threads::Mutex _latency_lock
void stop_hw_event_processing()
std::atomic< int > _stop_hw_devicelist_processing
Glib::Threads::Cond _hw_devicelist_update_condition
bool setup_required() const
Glib::Threads::Mutex _process_lock
PBD::Signal< void(pframes_t)> BufferSizeChanged
int stop(bool for_latency_measurement=false)
void set_latency_input_port(const std::string &)
gain_t session_removal_gain
int sync_callback(TransportState state, samplepos_t position)
int freewheel(bool start_stop)
void request_backend_reset()
samplecnt_t _latency_signal_latency
void add_pending_port_deletion(Port *)
AudioBackendInfo * backend_discover(const std::string &)
Glib::Threads::Mutex _reset_request_lock
int prepare_for_latency_measurement()
PBD::Thread * _hw_reset_event_thread
void stop_latency_detection()
int start(bool for_latency_measurement=false)
bool _stopped_for_latency
std::atomic< int > _pending_playback_latency_callback
std::atomic< int > _hw_reset_request_count
std::shared_ptr< ProtoPort > PortPtr
Temporal::samplecnt_t samplecnt_t
Temporal::sampleoffset_t sampleoffset_t
Temporal::samplepos_t samplepos_t