From 2e7a3b3bc94f8d68475883c845f31ee42cba115c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 27 Nov 2020 20:19:46 +0100 Subject: Remove use of PatchagePort from Driver connection interface --- src/PatchageCanvas.cpp | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'src/PatchageCanvas.cpp') diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp index fb48bff..16a85ef 100644 --- a/src/PatchageCanvas.cpp +++ b/src/PatchageCanvas.cpp @@ -238,12 +238,22 @@ PatchageCanvas::connect(Ganv::Node* port1, Ganv::Node* port2) (p1->type() == PortType::jack_osc && p2->type() == PortType::jack_osc)) { #if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) - _app->jack_driver()->connect(p1, p2); + _app->jack_driver()->connect(p1->id(), + p1->module_name(), + p1->name(), + p2->id(), + p2->module_name(), + p2->name()); #endif #ifdef HAVE_ALSA } else if (p1->type() == PortType::alsa_midi && p2->type() == PortType::alsa_midi) { - _app->alsa_driver()->connect(p1, p2); + _app->alsa_driver()->connect(p1->id(), + p1->module_name(), + p1->name(), + p2->id(), + p2->module_name(), + p2->name()); #endif } else { _app->log().warning("Cannot make connection, incompatible port types"); @@ -276,11 +286,22 @@ PatchageCanvas::disconnect(Ganv::Node* port1, Ganv::Node* port2) input->type() == PortType::jack_cv || input->type() == PortType::jack_osc) { #if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) - _app->jack_driver()->disconnect(output, input); + _app->jack_driver()->disconnect(output->id(), + output->module_name(), + output->name(), + input->id(), + input->module_name(), + input->name()); + #endif #ifdef HAVE_ALSA } else if (input->type() == PortType::alsa_midi) { - _app->alsa_driver()->disconnect(output, input); + _app->alsa_driver()->disconnect(output->id(), + output->module_name(), + output->name(), + input->id(), + input->module_name(), + input->name()); #endif } else { _app->log().error("Attempt to disconnect ports with strange types"); -- cgit v1.2.1