From 4e2d99fd211f92130e9d07365af0ea14d511ed59 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 28 Jan 2006 13:35:31 +0000 Subject: [PATCH] fix computation of MMC base track for MMC rec enable (Ben Loftis) git-svn-id: svn://localhost/trunk/ardour2@301 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/midi++2/mmc.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/midi++2/mmc.cc b/libs/midi++2/mmc.cc index a7501664f2..0d369db433 100644 --- a/libs/midi++2/mmc.cc +++ b/libs/midi++2/mmc.cc @@ -512,7 +512,7 @@ MachineControl::write_track_record_ready (byte *msg, size_t len) change track 3: msg[0] = 1; << second byte of track bitmap msg[1] = 0000001; << binary: bit 0 set - the (msg[0] * 7) - 5 computation is an attempt to + the (msg[0] * 8) - 6 computation is an attempt to extract the value of the first track: ie. the one that would be indicated by bit 0 being set. @@ -529,7 +529,11 @@ MachineControl::write_track_record_ready (byte *msg, size_t len) supported number of tracks. */ - base_track = (msg[0] * 7) - 5; + if (msg[0] == 0) { + base_track = -5; + } else { + base_track = (msg[0] * 8) - 6; + } for (n = 0; n < 7; n++) { if (msg[1] & (1<