summaryrefslogtreecommitdiffstats
path: root/src/PatchageFlowCanvas.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-11-11 01:00:47 +0000
committerDavid Robillard <d@drobilla.net>2006-11-11 01:00:47 +0000
commit9ed6efc808cb57555f89f08475df70fd4f8b630b (patch)
tree5486ef7e97a6978f985b433e1966f76a03501845 /src/PatchageFlowCanvas.cpp
parent5b83af28b6eeb52a285618cd90f30a5461189efd (diff)
downloadpatchage-9ed6efc808cb57555f89f08475df70fd4f8b630b.tar.gz
patchage-9ed6efc808cb57555f89f08475df70fd4f8b630b.tar.bz2
patchage-9ed6efc808cb57555f89f08475df70fd4f8b630b.zip
Fixes for building without ALSA (eg on OSX)
git-svn-id: http://svn.drobilla.net/lad/patchage@200 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageFlowCanvas.cpp')
-rw-r--r--src/PatchageFlowCanvas.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/PatchageFlowCanvas.cpp b/src/PatchageFlowCanvas.cpp
index 7485b6e..5cf4c35 100644
--- a/src/PatchageFlowCanvas.cpp
+++ b/src/PatchageFlowCanvas.cpp
@@ -43,6 +43,7 @@ PatchageFlowCanvas::find_module(const string& name, ModuleType type)
}
+#ifdef HAVE_ALSA
boost::shared_ptr<PatchagePort>
PatchageFlowCanvas::find_port(const snd_seq_addr_t* alsa_addr)
{
@@ -59,7 +60,7 @@ PatchageFlowCanvas::find_port(const snd_seq_addr_t* alsa_addr)
return boost::shared_ptr<PatchagePort>();
}
-
+#endif
void
PatchageFlowCanvas::connect(boost::shared_ptr<Port> port1, boost::shared_ptr<Port> port2)
@@ -72,8 +73,10 @@ PatchageFlowCanvas::connect(boost::shared_ptr<Port> port1, boost::shared_ptr<Por
if (p1->type() == JACK_AUDIO && p2->type() == JACK_AUDIO
|| (p1->type() == JACK_MIDI && p2->type() == JACK_MIDI))
m_app->jack_driver()->connect(p1, p2);
+#ifdef HAVE_ALSA
else if (p1->type() == ALSA_MIDI && p2->type() == ALSA_MIDI)
m_app->alsa_driver()->connect(p1, p2);
+#endif
else
status_message("WARNING: Cannot make connection, incompatible port types.");
}
@@ -101,8 +104,10 @@ PatchageFlowCanvas::disconnect(boost::shared_ptr<Port> port1, boost::shared_ptr<
if (input->type() == JACK_AUDIO && output->type() == JACK_AUDIO
|| input->type() == JACK_MIDI && output->type() == JACK_MIDI)
m_app->jack_driver()->disconnect(output, input);
+#ifdef HAVE_ALSA
else if (input->type() == ALSA_MIDI && output->type() == ALSA_MIDI)
m_app->alsa_driver()->disconnect(output, input);
+#endif
else
status_message("ERROR: Attempt to disconnect ports with mismatched types");
}