Ardour  9.0-pre0-582-g084a23a80d
jack_connection.h
Go to the documentation of this file.
1 #ifndef __libardour_jack_connection_h__
2 #define __libardour_jack_connection_h__
3 
4 #include <string>
5 #include "weak_libjack.h"
6 
7 #include "pbd/signals.h"
8 
9 namespace ARDOUR {
10 
12  public:
13  JackConnection (const std::string& client_name, const std::string& session_uuid);
15 
16  const std::string& client_name() const { return _client_name; }
17 
18  int open ();
19  int close ();
20  bool connected () const { return _jack != 0; }
21 
22  jack_client_t* jack() const { return _jack; }
23 
25  PBD::Signal<void(const char*)> Disconnected;
26 
27  void halted_callback ();
28  void halted_info_callback (jack_status_t, const char*);
29 
30  static bool in_control() { return _in_control; }
31 
32  uint32_t probed_buffer_size () const { assert (!connected ()); return _probed_buffer_size; }
33  uint32_t probed_sample_rate () const { assert (!connected ()); return _probed_sample_rate; }
34 
35  private:
36  jack_client_t* volatile _jack;
37  std::string _client_name;
38  std::string session_uuid;
39  static bool _in_control;
40  uint32_t _probed_buffer_size; // when not in control
41  uint32_t _probed_sample_rate; // when not in control
42 };
43 
44 } // namespace
45 
46 #endif /* __libardour_jack_connection_h__ */
uint32_t probed_buffer_size() const
uint32_t probed_sample_rate() const
jack_client_t *volatile _jack
static bool in_control()
void halted_info_callback(jack_status_t, const char *)
jack_client_t * jack() const
PBD::Signal< void(const char *)> Disconnected
JackConnection(const std::string &client_name, const std::string &session_uuid)
PBD::Signal< void()> Connected
const std::string & client_name() const