mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
Work around pipewire MIDI monitoring issues
As opposed to JACK, pipewire does not unconditionally make MIDI bufffers of terminal/physical ports available to clients. Since it works with JACK, it is something that eventually needs to be fixed in pipewire. Until then this mitigates the issue. see also954edb7bd8andf196256604https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1471#note_1016904
This commit is contained in:
parent
c1dddb1b25
commit
2007bf2d5f
1 changed files with 8 additions and 2 deletions
|
|
@ -739,7 +739,8 @@ PortManager::reestablish_ports ()
|
|||
|
||||
|
||||
if (Config->get_work_around_jack_no_copy_optimization () && AudioEngine::instance()->current_backend_name() == X_("JACK")) {
|
||||
port_engine().register_port (X_("physical_input_monitor_enable"), DataType::AUDIO, ARDOUR::PortFlags (IsInput|IsTerminal|Hidden));
|
||||
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));
|
||||
}
|
||||
|
||||
update_input_ports (true);
|
||||
|
|
@ -783,7 +784,7 @@ PortManager::reconnect_ports ()
|
|||
}
|
||||
|
||||
if (Config->get_work_around_jack_no_copy_optimization () && AudioEngine::instance()->current_backend_name() == X_("JACK")) {
|
||||
std::string const our_name = AudioEngine::instance()->make_port_name_non_relative (X_("physical_input_monitor_enable"));
|
||||
std::string const our_name = AudioEngine::instance()->make_port_name_non_relative (X_("physical_audio_input_monitor_enable"));
|
||||
std::vector<std::string> audio_ports;
|
||||
get_physical_inputs (DataType::AUDIO, audio_ports);
|
||||
for (std::vector<std::string>::iterator p = audio_ports.begin(); p != audio_ports.end(); ++p) {
|
||||
|
|
@ -949,6 +950,11 @@ 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")) {
|
||||
std::string const our_name = AudioEngine::instance()->make_port_name_non_relative (X_("physical_midi_input_monitor_enable"));
|
||||
port_engine().connect (*p, our_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue