slightly improved fixes for MIDI issues

git-svn-id: svn://localhost/ardour2/trunk@2260 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2007-08-06 17:50:23 +00:00
parent 6529c7994f
commit d07f541cdf
3 changed files with 12 additions and 4 deletions

View file

@ -1813,6 +1813,10 @@ ARDOUR_UI::save_template ()
ArdourPrompter prompter (true); ArdourPrompter prompter (true);
string name; string name;
if (!check_audioengine()) {
return;
}
prompter.set_name (X_("Prompter")); prompter.set_name (X_("Prompter"));
prompter.set_prompt (_("Name for mix template:")); prompter.set_prompt (_("Name for mix template:"));
prompter.set_initial_text(session->name() + _("-template")); prompter.set_initial_text(session->name() + _("-template"));

View file

@ -146,6 +146,10 @@ ARDOUR::setup_midi (AudioEngine& engine)
nports++; nports++;
} }
MIDI::Port* first;
const MIDI::Manager::PortMap& ports = MIDI::Manager::instance()->get_midi_ports();
first = ports.begin()->second;
if (nports > 1) { if (nports > 1) {
/* More than one port, so try using specific names for each port */ /* More than one port, so try using specific names for each port */
@ -167,15 +171,15 @@ ARDOUR::setup_midi (AudioEngine& engine)
/* If that didn't work, just use the first listed port */ /* If that didn't work, just use the first listed port */
if (default_mmc_port == 0) { if (default_mmc_port == 0) {
default_mmc_port = MIDI::Manager::instance()->port (""); default_mmc_port = first;
} }
if (default_mtc_port == 0) { if (default_mtc_port == 0) {
default_mtc_port = MIDI::Manager::instance()->port (""); default_mtc_port = first;
} }
if (default_midi_port == 0) { if (default_midi_port == 0) {
default_midi_port = MIDI::Manager::instance()->port (""); default_midi_port = first;
} }
} else { } else {

View file

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