diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-30 20:35:31 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-30 21:00:34 -0400 |
commit | 8d59afb0486e1816f5ef30526c2dc762b9f4eda8 (patch) | |
tree | de90977cedb059b8c9c3c911f5e2ffe2493971a4 /libs/ardour/ardour/audioengine.h | |
parent | 38e975d6b1d6e8b1cd85e7896bc00a63643d4f1d (diff) |
copy over current Waves version of their backend, along with minor changes in libs/ardour and libs/backend/jack to fit with API changes
Diffstat (limited to 'libs/ardour/ardour/audioengine.h')
-rw-r--r-- | libs/ardour/ardour/audioengine.h | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h index 7eeae8f205..5679d375aa 100644 --- a/libs/ardour/ardour/audioengine.h +++ b/libs/ardour/ardour/audioengine.h @@ -108,9 +108,15 @@ public: bool in_process_thread (); uint32_t process_thread_count (); + void request_backend_reset(); + void request_device_list_update(); + bool is_realtime() const; bool connected() const; + // for the user which hold state_lock to check if reset operation is pending + bool is_reset_requested() const { return g_atomic_int_get(const_cast<gint*>(&_hw_reset_request_count)); } + int set_device_name (const std::string&); int set_sample_rate (float); int set_buffer_size (uint32_t); @@ -126,6 +132,7 @@ public: bool running() const { return _running; } Glib::Threads::Mutex& process_lock() { return _process_lock; } + Glib::Threads::RecMutex& state_lock() { return _state_lock; } int request_buffer_size (pframes_t samples) { return set_buffer_size (samples); @@ -137,6 +144,8 @@ public: void remove_session (); // not a replacement for SessionHandle::session_going_away() Session* session() const { return _session; } + void reconnect_session_routes (bool reconnect_inputs = true, bool reconnect_outputs = true); + class NoBackendAvailable : public std::exception { public: virtual const char *what() const throw() { return "could not connect to engine backend"; } @@ -159,6 +168,18 @@ public: /* this signal is emitted if the sample rate changes */ PBD::Signal1<void, framecnt_t> SampleRateChanged; + + /* this signal is emitted if the buffer size changes */ + + PBD::Signal1<void, pframes_t> BufferSizeChanged; + + /* this signal is emitted if the device cannot operate properly */ + + PBD::Signal0<void> DeviceError; + + /* this signal is emitted if the device list changed */ + + PBD::Signal0<void> DeviceListChanged; /* this signal is sent if the backend ever disconnects us */ @@ -215,7 +236,8 @@ public: static AudioEngine* _instance; - Glib::Threads::Mutex _process_lock; + Glib::Threads::Mutex _process_lock; + Glib::Threads::RecMutex _state_lock; Glib::Threads::Cond session_removed; bool session_remove_pending; frameoffset_t session_removal_countdown; @@ -244,6 +266,22 @@ public: bool _started_for_latency; bool _in_destructor; + Glib::Threads::Thread* _hw_reset_event_thread; + gint _hw_reset_request_count; + Glib::Threads::Cond _hw_reset_condition; + Glib::Threads::Mutex _reset_request_lock; + gint _stop_hw_reset_processing; + Glib::Threads::Thread* _hw_devicelist_update_thread; + gint _hw_devicelist_update_count; + Glib::Threads::Cond _hw_devicelist_update_condition; + Glib::Threads::Mutex _devicelist_update_lock; + gint _stop_hw_devicelist_processing; + + void start_hw_event_processing(); + void stop_hw_event_processing(); + void do_reset_backend(); + void do_devicelist_update(); + void meter_thread (); void start_metering_thread (); void stop_metering_thread (); |