slightly improved fixes for MIDI issues
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 6 Aug 2007 17:50:23 +0000 (17:50 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 6 Aug 2007 17:50:23 +0000 (17:50 +0000)
git-svn-id: svn://localhost/ardour2/trunk@2260 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour_ui.cc
libs/ardour/globals.cc
libs/ardour/session_midi.cc

index cd0f412692ea4dfac656a0c99e0b4e19b8ede41d..57804deb8c8745b9cfd3e514355906d0f20c24b3 100644 (file)
@@ -1813,6 +1813,10 @@ ARDOUR_UI::save_template ()
        ArdourPrompter prompter (true);
        string name;
 
+       if (!check_audioengine()) {
+               return;
+       }
+
        prompter.set_name (X_("Prompter"));
        prompter.set_prompt (_("Name for mix template:"));
        prompter.set_initial_text(session->name() + _("-template"));
index ba6a7383c8d3460e986b07709c8b468e81d170a9..52be946f1e59155ba02e6c5f2c336470e3b1c0d8 100644 (file)
@@ -146,6 +146,10 @@ ARDOUR::setup_midi (AudioEngine& engine)
                nports++;
        }
 
+       MIDI::Port* first;
+       const MIDI::Manager::PortMap& ports = MIDI::Manager::instance()->get_midi_ports();
+       first = ports.begin()->second;
+
        if (nports > 1) {
 
                /* 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 (default_mmc_port == 0) {
-                       default_mmc_port = MIDI::Manager::instance()->port ("");
+                       default_mmc_port = first;
                }
 
                if (default_mtc_port == 0) {
-                       default_mtc_port = MIDI::Manager::instance()->port ("");
+                       default_mtc_port = first;
                }
 
                if (default_midi_port == 0) {
-                       default_midi_port = MIDI::Manager::instance()->port ("");
+                       default_midi_port = first;
                }
                
        } else {
index 177b2ef54a21867744dc8840b0495421cf60a679..2076f5d25f21a0f38e8caf324340305e4098cb19 100644 (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 ? mmc->send_device_id() : 0x00);
+       mmc_buffer[2] = (mmc ? mmc->send_device_id() : 0x7f);
        mmc_buffer[3] = 0x6;  // MCC
 
        /* Set up the qtr frame message */