From 9ed6efc808cb57555f89f08475df70fd4f8b630b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 11 Nov 2006 01:00:47 +0000 Subject: Fixes for building without ALSA (eg on OSX) git-svn-id: http://svn.drobilla.net/lad/patchage@200 a436a847-0d15-0410-975c-d299462d15a1 --- src/PatchageFlowCanvas.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/PatchageFlowCanvas.cpp') 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 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(); } - +#endif void PatchageFlowCanvas::connect(boost::shared_ptr port1, boost::shared_ptr port2) @@ -72,8 +73,10 @@ PatchageFlowCanvas::connect(boost::shared_ptr port1, boost::shared_ptrtype() == 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 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"); } -- cgit v1.2.1