mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
The thing called backend_client_name defaulted to lowercase PROGRAM_NAME
and could be controlled with:
-c, --name <name> Use a specific backend client name, default is ardour
This value was *only* used for set_backend arg2 which only is used for
jack, where it was called session_uuid and passed to jack_client_open as
"a SessionID Token this allows the sessionmanager to identify the client
again" because JackSessionID.
It is certainly misleading to call it a uuid. It also doesn't seem
helpful to call it "client name" when the documentation calls it
"session id". And mostly: jack_client_open calls its *first* argument
"client_name" and it comes from argv1.
To clear things up, consistently call it something with "session id".
And it is not helpful to use a generic arg2 naming.
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
#ifndef __libardour_jack_connection_h__
|
|
#define __libardour_jack_connection_h__
|
|
|
|
#include <string>
|
|
#include "weak_libjack.h"
|
|
|
|
#include "pbd/signals.h"
|
|
|
|
namespace ARDOUR {
|
|
|
|
class JackConnection {
|
|
public:
|
|
JackConnection (const std::string& client_name, const std::string& session_id);
|
|
~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::Signal<void()> Connected;
|
|
PBD::Signal<void(const char*)> Disconnected;
|
|
|
|
void halted_callback ();
|
|
void halted_info_callback (jack_status_t, const char*);
|
|
|
|
static bool in_control() { return _in_control; }
|
|
|
|
uint32_t probed_buffer_size () const { assert (!connected ()); return _probed_buffer_size; }
|
|
uint32_t probed_sample_rate () const { assert (!connected ()); return _probed_sample_rate; }
|
|
|
|
private:
|
|
jack_client_t* volatile _jack;
|
|
std::string _client_name;
|
|
std::string _session_id;
|
|
static bool _in_control;
|
|
uint32_t _probed_buffer_size; // when not in control
|
|
uint32_t _probed_sample_rate; // when not in control
|
|
};
|
|
|
|
} // namespace
|
|
|
|
#endif /* __libardour_jack_connection_h__ */
|