diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-07 11:03:57 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-07 11:03:57 -0400 |
commit | f4cf283f2683f7883f799a8ef6cd58084e610bb7 (patch) | |
tree | 219c9a19b0bcdd275da150767201878f8ebf11f2 /libs/backends/jack/jack_connection.h | |
parent | e435f22793641263e88bd44a8f47fc266db920b5 (diff) |
move JACK audio backend to its own folder and adjust build system to reflect that (installed version may now work)
Diffstat (limited to 'libs/backends/jack/jack_connection.h')
-rw-r--r-- | libs/backends/jack/jack_connection.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libs/backends/jack/jack_connection.h b/libs/backends/jack/jack_connection.h new file mode 100644 index 0000000000..cd45f3b9ba --- /dev/null +++ b/libs/backends/jack/jack_connection.h @@ -0,0 +1,40 @@ +#ifndef __libardour_jack_connection_h__ +#define __libardour_jack_connection_h__ + +#include <string> +#include <jack/jack.h> + +#include "pbd/signals.h" + +namespace ARDOUR { + +class JackConnection { + public: + JackConnection (const std::string& client_name, const std::string& session_uuid); + ~JackConnection (); + + const std::string& client_name() const { return _client_name; } + + int open (); + int close (); + bool connected () const { return _jack != 0; } + + jack_client_t* jack() const { return _jack; } + + PBD::Signal0<void> Connected; + PBD::Signal1<void,const char*> Disconnected; + + void halted_callback (); + void halted_info_callback (jack_status_t, const char*); + + static bool server_running(); + + private: + jack_client_t* volatile _jack; + std::string _client_name; + std::string session_uuid; +}; + +} // namespace + +#endif /* __libardour_jack_connection_h__ */ |