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;
}
* @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;
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;
}
}
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;