summaryrefslogtreecommitdiff
path: root/libs/ardour/globals.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-11-13 19:50:39 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-11-13 19:50:39 +0000
commit67601c6c50ac6506c1c6f87be1c726bd1fa4241b (patch)
tree9b29e7718238fd0f6ebb992ece10a87d65b654a0 /libs/ardour/globals.cc
parentff9ddf510065305e13d169d35f9b4e6b88ce76d7 (diff)
fix stupid MIDI::Manager design to properly handle multiple MIDI ports with the same "device" specification
git-svn-id: svn://localhost/ardour2/branches/3.0@6079 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/globals.cc')
-rw-r--r--libs/ardour/globals.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc
index 8efb72cc8c..ac7eb8605d 100644
--- a/libs/ardour/globals.cc
+++ b/libs/ardour/globals.cc
@@ -136,12 +136,11 @@ ARDOUR::setup_midi ()
}
MIDI::Port* first;
- const MIDI::Manager::PortMap& ports = MIDI::Manager::instance()->get_midi_ports();
-
+ const MIDI::Manager::PortList& ports = MIDI::Manager::instance()->get_midi_ports();
if (ports.size() > 1) {
- first = ports.begin()->second;
+ first = ports.front();
/* More than one port, so try using specific names for each port */
@@ -170,7 +169,7 @@ ARDOUR::setup_midi ()
} else if (ports.size() == 1) {
- first = ports.begin()->second;
+ first = ports.front();
/* Only one port described, so use it for both MTC and MMC */