summaryrefslogtreecommitdiff
path: root/libs/midi++2/mmc.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-01-28 13:35:31 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-01-28 13:35:31 +0000
commit4e2d99fd211f92130e9d07365af0ea14d511ed59 (patch)
treea28a2e5b6a217e0d5d6342b603f4b4cfb4342021 /libs/midi++2/mmc.cc
parent81ef56fba962ff7b16658cc2831720947aacc8b5 (diff)
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
Diffstat (limited to 'libs/midi++2/mmc.cc')
-rw-r--r--libs/midi++2/mmc.cc8
1 files 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<<n)) {