X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fmidi%2B%2B2%2Fmmc.cc;h=d722a816eef104932a99669b875aed6bfd09de0b;hb=2e62ca9631286df44a42f250323c5eb9775a8aee;hp=b92e686ce6b753bca71bea99b2b2be0b5fa70c98;hpb=2b9421fd391efcddde0be3397cb66e19b744a155;p=ardour.git diff --git a/libs/midi++2/mmc.cc b/libs/midi++2/mmc.cc index b92e686ce6..d722a816ee 100644 --- a/libs/midi++2/mmc.cc +++ b/libs/midi++2/mmc.cc @@ -284,7 +284,7 @@ MachineControl::process_mmc_message (Parser &, MIDI::byte *msg, size_t len) cerr << endl; #endif - if (msg[1] != 0x7f && msg[1] != _receive_device_id) { + if (_receive_device_id != 0x7f && msg[1] != 0x7f && msg[1] != _receive_device_id) { return; } @@ -651,7 +651,7 @@ MachineControl::enable_send (bool yn) * @param c command. */ void -MachineControl::send (MachineControlCommand const & c) +MachineControl::send (MachineControlCommand const & c, timestamp_t when) { if (_output_port == 0 || !_enable_send) { // cerr << "Not delivering MMC " << _mmc->port() << " - " << session_send_mmc << endl; @@ -661,7 +661,7 @@ MachineControl::send (MachineControlCommand const & c) MIDI::byte buffer[32]; MIDI::byte* b = c.fill_buffer (this, buffer); - if (_output_port->midimsg (buffer, b - buffer, 0)) { + if (_output_port->midimsg (buffer, b - buffer, when)) { error << "MMC: cannot send command" << endmsg; } } @@ -710,7 +710,7 @@ MachineControlCommand::fill_buffer (MachineControl* mmc, MIDI::byte* b) const if (_command == MachineControl::cmdLocate) { *b++ = 0x6; // byte count *b++ = 0x1; // "TARGET" subcommand - *b++ = _time.hours; + *b++ = _time.hours % 24; *b++ = _time.minutes; *b++ = _time.seconds; *b++ = _time.frames;