mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
audio_backend: Rename instantiate() parameter arg1 to client_name
This parameter is consistently used to name the audio backend instance and how it appear as client of the sound server. Just name it `client_name`, consistent with the name of the jack_client_open parameter it is passed to .
This commit is contained in:
parent
710bd07cd4
commit
79e99c12a5
10 changed files with 25 additions and 25 deletions
|
|
@ -44,11 +44,11 @@ namespace ARDOUR
|
|||
struct LIBARDOUR_API AudioBackendInfo {
|
||||
const char* name;
|
||||
|
||||
/** Using arg1 and session_id, initialize this audiobackend.
|
||||
/** Using client_name and session_id, initialize this audiobackend.
|
||||
*
|
||||
* Returns zero on success, non-zero otherwise.
|
||||
*/
|
||||
int (*instantiate) (const std::string& arg1, const std::string& session_id);
|
||||
int (*instantiate) (const std::string& client_name, const std::string& session_id);
|
||||
|
||||
/** Release all resources associated with this audiobackend */
|
||||
int (*deinstantiate) (void);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class LIBARDOUR_API AudioEngine : public PortManager, public SessionHandlePtr
|
|||
int discover_backends();
|
||||
std::vector<const AudioBackendInfo*> available_backends() const;
|
||||
std::string current_backend_name () const;
|
||||
std::shared_ptr<AudioBackend> set_backend (const std::string& name, const std::string& arg1, const std::string& session_id);
|
||||
std::shared_ptr<AudioBackend> set_backend (const std::string& name, const std::string& client_name, const std::string& session_id);
|
||||
std::shared_ptr<AudioBackend> current_backend() const { return _backend; }
|
||||
bool setup_required () const;
|
||||
bool is_jack () const;
|
||||
|
|
|
|||
|
|
@ -1015,7 +1015,7 @@ AudioEngine::drop_backend ()
|
|||
}
|
||||
|
||||
std::shared_ptr<AudioBackend>
|
||||
AudioEngine::set_backend (const std::string& name, const std::string& arg1, const std::string& session_id)
|
||||
AudioEngine::set_backend (const std::string& name, const std::string& client_name, const std::string& session_id)
|
||||
{
|
||||
BackendMap::iterator b = _backends.find (name);
|
||||
|
||||
|
|
@ -1026,7 +1026,7 @@ AudioEngine::set_backend (const std::string& name, const std::string& arg1, cons
|
|||
drop_backend ();
|
||||
|
||||
try {
|
||||
if (b->second->instantiate (arg1, session_id)) {
|
||||
if (b->second->instantiate (client_name, session_id)) {
|
||||
throw failed_constructor ();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2181,7 +2181,7 @@ AlsaAudioBackend::AudioSlave::update_latencies (uint32_t play, uint32_t capt)
|
|||
static std::shared_ptr<AlsaAudioBackend> _instance;
|
||||
|
||||
static std::shared_ptr<AudioBackend> backend_factory (AudioEngine& e);
|
||||
static int instantiate (const std::string& arg1, const std::string& /* session_id */);
|
||||
static int instantiate (const std::string& client_name, const std::string& /* session_id */);
|
||||
static int deinstantiate ();
|
||||
static bool already_configured ();
|
||||
static bool available ();
|
||||
|
|
@ -2205,9 +2205,9 @@ backend_factory (AudioEngine& e)
|
|||
}
|
||||
|
||||
static int
|
||||
instantiate (const std::string& arg1, const std::string& /* session_id */)
|
||||
instantiate (const std::string& client_name, const std::string& /* session_id */)
|
||||
{
|
||||
s_instance_name = arg1;
|
||||
s_instance_name = client_name;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1529,7 +1529,7 @@ CoreAudioBackend::hw_changed_callback ()
|
|||
static std::shared_ptr<CoreAudioBackend> _instance;
|
||||
|
||||
static std::shared_ptr<AudioBackend> backend_factory (AudioEngine& e);
|
||||
static int instantiate (const std::string& arg1, const std::string& /* session_id */);
|
||||
static int instantiate (const std::string& client_name, const std::string& /* session_id */);
|
||||
static int deinstantiate ();
|
||||
static bool already_configured ();
|
||||
static bool available ();
|
||||
|
|
@ -1553,9 +1553,9 @@ backend_factory (AudioEngine& e)
|
|||
}
|
||||
|
||||
static int
|
||||
instantiate (const std::string& arg1, const std::string& /* session_id */)
|
||||
instantiate (const std::string& client_name, const std::string& /* session_id */)
|
||||
{
|
||||
s_instance_name = arg1;
|
||||
s_instance_name = client_name;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1016,7 +1016,7 @@ DummyAudioBackend::main_process_thread ()
|
|||
static std::shared_ptr<DummyAudioBackend> _instance;
|
||||
|
||||
static std::shared_ptr<AudioBackend> backend_factory (AudioEngine& e);
|
||||
static int instantiate (const std::string& arg1, const std::string& /* session_id */);
|
||||
static int instantiate (const std::string& client_name, const std::string& /* session_id */);
|
||||
static int deinstantiate ();
|
||||
static bool already_configured ();
|
||||
static bool available ();
|
||||
|
|
@ -1040,9 +1040,9 @@ backend_factory (AudioEngine& e)
|
|||
}
|
||||
|
||||
static int
|
||||
instantiate (const std::string& arg1, const std::string& /* session_id */)
|
||||
instantiate (const std::string& client_name, const std::string& /* session_id */)
|
||||
{
|
||||
s_instance_name = arg1;
|
||||
s_instance_name = client_name;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ static std::shared_ptr<JACKAudioBackend> backend;
|
|||
static std::shared_ptr<JackConnection> jack_connection;
|
||||
|
||||
static std::shared_ptr<AudioBackend> backend_factory (AudioEngine& ae);
|
||||
static int instantiate (const std::string& arg1, const std::string& session_id);
|
||||
static int instantiate (const std::string& client_name, const std::string& session_id);
|
||||
static int deinstantiate ();
|
||||
static bool already_configured ();
|
||||
static bool available ();
|
||||
|
|
@ -58,10 +58,10 @@ backend_factory (AudioEngine& ae)
|
|||
}
|
||||
|
||||
static int
|
||||
instantiate (const std::string& arg1, const std::string& session_id)
|
||||
instantiate (const std::string& client_name, const std::string& session_id)
|
||||
{
|
||||
try {
|
||||
jack_connection.reset (new JackConnection (arg1, session_id));
|
||||
jack_connection.reset (new JackConnection (client_name, session_id));
|
||||
backend.reset ();
|
||||
} catch (...) {
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ static void jack_halted_info_callback (jack_status_t code, const char* reason, v
|
|||
}
|
||||
|
||||
|
||||
JackConnection::JackConnection (const std::string& arg1, const std::string& session_id)
|
||||
JackConnection::JackConnection (const std::string& client_name, const std::string& session_id)
|
||||
: _jack (0)
|
||||
, _client_name (arg1)
|
||||
, _client_name (client_name)
|
||||
, _session_id (session_id)
|
||||
, _probed_buffer_size (0)
|
||||
, _probed_sample_rate (0)
|
||||
|
|
|
|||
|
|
@ -1793,7 +1793,7 @@ PortAudioBackend::process_port_connection_changes ()
|
|||
static std::shared_ptr<PortAudioBackend> _instance;
|
||||
|
||||
static std::shared_ptr<AudioBackend> backend_factory (AudioEngine& e);
|
||||
static int instantiate (const std::string& arg1, const std::string& /* session_id */);
|
||||
static int instantiate (const std::string& client_name, const std::string& /* session_id */);
|
||||
static int deinstantiate ();
|
||||
static bool already_configured ();
|
||||
static bool available ();
|
||||
|
|
@ -1817,9 +1817,9 @@ backend_factory (AudioEngine& e)
|
|||
}
|
||||
|
||||
static int
|
||||
instantiate (const std::string& arg1, const std::string& /* session_id */)
|
||||
instantiate (const std::string& client_name, const std::string& /* session_id */)
|
||||
{
|
||||
s_instance_name = arg1;
|
||||
s_instance_name = client_name;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1084,7 +1084,7 @@ PulseAudioBackend::main_process_thread ()
|
|||
static std::shared_ptr<PulseAudioBackend> _instance;
|
||||
|
||||
static std::shared_ptr<AudioBackend> backend_factory (AudioEngine& e);
|
||||
static int instantiate (const std::string& arg1, const std::string& /* session_id */);
|
||||
static int instantiate (const std::string& client_name, const std::string& /* session_id */);
|
||||
static int deinstantiate ();
|
||||
static bool already_configured ();
|
||||
static bool available ();
|
||||
|
|
@ -1108,9 +1108,9 @@ backend_factory (AudioEngine& e)
|
|||
}
|
||||
|
||||
static int
|
||||
instantiate (const std::string& arg1, const std::string& /* session_id */)
|
||||
instantiate (const std::string& client_name, const std::string& /* session_id */)
|
||||
{
|
||||
s_instance_name = arg1;
|
||||
s_instance_name = client_name;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue