mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Rename JACK to "JACK/Pipewire" on Linux (1/2)
This commit is contained in:
parent
cc56f92a73
commit
a76b2ed1bb
9 changed files with 27 additions and 7 deletions
|
|
@ -161,6 +161,9 @@ public:
|
|||
*/
|
||||
virtual bool is_realtime () const = 0;
|
||||
|
||||
/** Return true if the backed is JACK */
|
||||
virtual bool is_jack () const { return false; }
|
||||
|
||||
virtual int client_real_time_priority () { return PBD_RT_PRI_PROC; }
|
||||
|
||||
/* Discovering devices and parameters */
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ class LIBARDOUR_API AudioEngine : public PortManager, public SessionHandlePtr
|
|||
std::shared_ptr<AudioBackend> set_backend (const std::string&, const std::string& arg1, const std::string& arg2);
|
||||
std::shared_ptr<AudioBackend> current_backend() const { return _backend; }
|
||||
bool setup_required () const;
|
||||
bool is_jack () const;
|
||||
|
||||
ProcessThread* main_thread() const { return _main_thread; }
|
||||
|
||||
|
|
|
|||
|
|
@ -986,6 +986,12 @@ AudioEngine::current_backend_name() const
|
|||
return string();
|
||||
}
|
||||
|
||||
bool
|
||||
AudioEngine::is_jack() const
|
||||
{
|
||||
return _backend && _backend->is_jack();
|
||||
}
|
||||
|
||||
void
|
||||
AudioEngine::drop_backend ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,13 +50,13 @@ Engine_TransportMaster::init ()
|
|||
bool
|
||||
Engine_TransportMaster::usable () const
|
||||
{
|
||||
return AudioEngine::instance()->current_backend_name() == X_("JACK");
|
||||
return AudioEngine::instance()->is_jack();
|
||||
}
|
||||
|
||||
void
|
||||
Engine_TransportMaster::check_backend()
|
||||
{
|
||||
if (AudioEngine::instance()->current_backend_name() == X_("JACK")) {
|
||||
if (AudioEngine::instance()->is_jack ()) {
|
||||
_connected = true;
|
||||
} else {
|
||||
_connected = false;
|
||||
|
|
|
|||
|
|
@ -1027,7 +1027,7 @@ ARDOUR::get_available_sync_options ()
|
|||
vector<SyncSource> ret;
|
||||
|
||||
std::shared_ptr<AudioBackend> backend = AudioEngine::instance ()->current_backend ();
|
||||
if (backend && backend->name () == "JACK") {
|
||||
if (backend && backend->is_jack ()) {
|
||||
ret.push_back (Engine);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -886,7 +886,7 @@ PortManager::reestablish_ports ()
|
|||
set_pretty_names (port_names, DataType::MIDI, false);
|
||||
}
|
||||
|
||||
if (Config->get_work_around_jack_no_copy_optimization () && AudioEngine::instance ()->current_backend_name () == X_("JACK")) {
|
||||
if (Config->get_work_around_jack_no_copy_optimization () && AudioEngine::instance ()->is_jack ()) {
|
||||
port_engine ().register_port (X_("physical_audio_input_monitor_enable"), DataType::AUDIO, ARDOUR::PortFlags (IsInput | IsTerminal | Hidden));
|
||||
port_engine ().register_port (X_("physical_midi_input_monitor_enable"), DataType::MIDI, ARDOUR::PortFlags (IsInput | IsTerminal | Hidden));
|
||||
}
|
||||
|
|
@ -943,7 +943,7 @@ PortManager::reconnect_ports ()
|
|||
}
|
||||
}
|
||||
|
||||
if (Config->get_work_around_jack_no_copy_optimization () && AudioEngine::instance ()->current_backend_name () == X_("JACK")) {
|
||||
if (Config->get_work_around_jack_no_copy_optimization () && AudioEngine::instance ()->is_jack ()) {
|
||||
std::string const audio_port = AudioEngine::instance ()->make_port_name_non_relative (X_("physical_audio_input_monitor_enable"));
|
||||
std::string const midi_port = AudioEngine::instance ()->make_port_name_non_relative (X_("physical_midi_input_monitor_enable"));
|
||||
std::vector<std::string> audio_ports;
|
||||
|
|
@ -1145,7 +1145,7 @@ PortManager::update_input_ports (bool clear)
|
|||
#endif
|
||||
mpw->insert (make_pair (*p, MIDIInputPort (32)));
|
||||
|
||||
if (Config->get_work_around_jack_no_copy_optimization () && AudioEngine::instance ()->current_backend_name () == X_("JACK")) {
|
||||
if (Config->get_work_around_jack_no_copy_optimization () && AudioEngine::instance ()->is_jack ()) {
|
||||
physical_midi_connection_list.push_back (*p);
|
||||
}
|
||||
}
|
||||
|
|
@ -1534,7 +1534,7 @@ PortManager::port_is_virtual_piano (std::string const& name)
|
|||
bool
|
||||
PortManager::port_is_physical_input_monitor_enable (std::string const& name)
|
||||
{
|
||||
if (Config->get_work_around_jack_no_copy_optimization () && AudioEngine::instance ()->current_backend_name () == X_("JACK")) {
|
||||
if (Config->get_work_around_jack_no_copy_optimization () && AudioEngine::instance ()->is_jack ()) {
|
||||
if (ends_with (name, X_(":physical_midi_input_monitor_enable"))) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,11 @@ static bool already_configured ();
|
|||
static bool available ();
|
||||
|
||||
static ARDOUR::AudioBackendInfo _descriptor = {
|
||||
#if ! (defined(__APPLE__) || defined(PLATFORM_WINDOWS))
|
||||
"JACK/Pipewire",
|
||||
#else
|
||||
"JACK",
|
||||
#endif
|
||||
instantiate,
|
||||
deinstantiate,
|
||||
backend_factory,
|
||||
|
|
|
|||
|
|
@ -87,7 +87,11 @@ JACKAudioBackend::~JACKAudioBackend()
|
|||
string
|
||||
JACKAudioBackend::name() const
|
||||
{
|
||||
#if ! (defined(__APPLE__) || defined(PLATFORM_WINDOWS))
|
||||
return X_("JACK/Pipewire");
|
||||
#else
|
||||
return X_("JACK");
|
||||
#endif
|
||||
}
|
||||
|
||||
void*
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ class JACKAudioBackend : public AudioBackend {
|
|||
void* private_handle() const;
|
||||
bool is_realtime () const;
|
||||
|
||||
bool is_jack () const { return true; }
|
||||
|
||||
bool requires_driver_selection() const;
|
||||
std::vector<std::string> enumerate_drivers () const;
|
||||
int set_driver (const std::string&);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue