Fix startup crashes from recent MIDI stuff.

git-svn-id: svn://localhost/ardour2/trunk@2259 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard
2007-08-06 17:44:07 +00:00
parent b0efb9f434
commit 6529c7994f
2 changed files with 5 additions and 5 deletions

View File

@@ -167,22 +167,22 @@ ARDOUR::setup_midi (AudioEngine& engine)
/* If that didn't work, just use the first listed port */
if (default_mmc_port == 0) {
default_mmc_port = MIDI::Manager::instance()->port (0);
default_mmc_port = MIDI::Manager::instance()->port ("");
}
if (default_mtc_port == 0) {
default_mtc_port = MIDI::Manager::instance()->port (0);
default_mtc_port = MIDI::Manager::instance()->port ("");
}
if (default_midi_port == 0) {
default_midi_port = MIDI::Manager::instance()->port (0);
default_midi_port = MIDI::Manager::instance()->port ("");
}
} else {
/* Only one port described, so use it for both MTC and MMC */
default_mmc_port = MIDI::Manager::instance()->port (0);
default_mmc_port = MIDI::Manager::instance()->port ("");
default_mtc_port = default_mmc_port;
default_midi_port = default_mmc_port;
}

View File

@@ -408,7 +408,7 @@ Session::setup_midi_control ()
mmc_buffer[0] = 0xf0; // SysEx
mmc_buffer[1] = 0x7f; // Real Time SysEx ID for MMC
mmc_buffer[2] = mmc->send_device_id();
mmc_buffer[2] = (mmc ? mmc->send_device_id() : 0x00);
mmc_buffer[3] = 0x6; // MCC
/* Set up the qtr frame message */