fix unconditional use of MMC object
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 7 Aug 2007 21:37:29 +0000 (21:37 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 7 Aug 2007 21:37:29 +0000 (21:37 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2266 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/session_midi.cc

index b6396a6bcadae38f651e58992bf752f3ccace4a1..8af45eef0ffd17fde0f37f1ed8c912eb4e29338d 100644 (file)
@@ -398,7 +398,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() : 0x7f);
        mmc_buffer[3] = 0x6;  // MCC
 
        /* Set up the qtr frame message */
@@ -932,6 +932,8 @@ Session::deliver_mmc (MIDI::MachineControl::Command cmd, nframes_t where)
                return;
        }
 
+       cerr << "delivering MMC, ID = " << (int) mmc_buffer[2] << endl;
+
        mmc_buffer[nbytes++] = cmd;
 
        // cerr << "delivering MMC, cmd = " << hex << (int) cmd << dec << endl;