From f9a66347152ad4459a564d5f92fdeabb6d8b4019 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 14 Jan 2007 04:22:16 +0000 Subject: Follow Jack port creation/destruction. git-svn-id: http://svn.drobilla.net/lad/patchage@257 a436a847-0d15-0410-975c-d299462d15a1 --- src/JackDriver.h | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'src/JackDriver.h') diff --git a/src/JackDriver.h b/src/JackDriver.h index c581df0..c37970c 100644 --- a/src/JackDriver.h +++ b/src/JackDriver.h @@ -22,9 +22,10 @@ #include #include #include -#include +#include #include "Driver.h" class Patchage; +class PatchageEvent; class PatchageFlowCanvas; class PatchagePort; class PatchageModule; @@ -48,6 +49,9 @@ public: bool is_attached() const { return (m_client != NULL); } bool is_realtime() const { return m_client && jack_is_realtime(m_client); } + + Queue& events() { return m_events; } + void refresh(); bool connect(boost::shared_ptr src, @@ -69,7 +73,7 @@ public: jack_transport_reposition(m_client, &zero); } - //jack_client_t* client() { return m_client; } + jack_client_t* client() { return m_client; } jack_nframes_t buffer_size(); void set_buffer_size(jack_nframes_t size); @@ -82,11 +86,11 @@ public: inline float max_delay() { return jack_get_max_delayed_usecs(m_client); } -private: - boost::shared_ptr create_port(boost::shared_ptr parent, jack_port_t* port); +private: + static void error_cb(const char* msg); void destroy_all_ports(); @@ -100,23 +104,15 @@ private: static void jack_shutdown_cb(void* me); Patchage* m_app; - jack_client_t* m_client; - bool m_is_activated; - - //Mutex m_mutex; - - list m_added_ports; - list m_removed_ports; + Queue m_events; + bool m_is_activated; jack_position_t m_last_pos; - - jack_nframes_t m_buffer_size; - size_t m_xruns; - float m_xrun_delay; - - bool m_settings_changed; + jack_nframes_t m_buffer_size; + size_t m_xruns; + float m_xrun_delay; }; -- cgit v1.2.1