diff options
author | David Robillard <d@drobilla.net> | 2007-01-14 04:22:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-01-14 04:22:16 +0000 |
commit | f9a66347152ad4459a564d5f92fdeabb6d8b4019 (patch) | |
tree | 8ab4ed5436a83bbad634773d5b3b96428f77d85e /src/JackDriver.h | |
parent | 8e946da143030272b1bb325aba1ea52e67792254 (diff) | |
download | patchage-f9a66347152ad4459a564d5f92fdeabb6d8b4019.tar.gz patchage-f9a66347152ad4459a564d5f92fdeabb6d8b4019.tar.bz2 patchage-f9a66347152ad4459a564d5f92fdeabb6d8b4019.zip |
Follow Jack port creation/destruction.
git-svn-id: http://svn.drobilla.net/lad/patchage@257 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/JackDriver.h')
-rw-r--r-- | src/JackDriver.h | 30 |
1 files changed, 13 insertions, 17 deletions
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 <boost/shared_ptr.hpp> #include <jack/jack.h> #include <jack/statistics.h> -#include <raul/Mutex.h> +#include <raul/Queue.h> #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<PatchageEvent>& events() { return m_events; } + void refresh(); bool connect(boost::shared_ptr<PatchagePort> 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<PatchagePort> create_port(boost::shared_ptr<PatchageModule> 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<string> m_added_ports; - list<string> m_removed_ports; + Queue<PatchageEvent> 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; }; |