summaryrefslogtreecommitdiff
path: root/libs/midi++2/mtc.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-03-18 06:07:08 +0000
committerDavid Robillard <d@drobilla.net>2007-03-18 06:07:08 +0000
commit99904735e066804358f1d0bd138a84f1e9ecda91 (patch)
tree71a924cf1660b5b00231275bd481bbd27094dd9b /libs/midi++2/mtc.cc
parenteb270e70a12c410cdd98585ad25bb6d8e384a4f5 (diff)
Merged with trunk R1612.
git-svn-id: svn://localhost/ardour2/branches/midi@1614 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2/mtc.cc')
-rw-r--r--libs/midi++2/mtc.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/midi++2/mtc.cc b/libs/midi++2/mtc.cc
index 19fdb1fabd..7fd86eff35 100644
--- a/libs/midi++2/mtc.cc
+++ b/libs/midi++2/mtc.cc
@@ -36,7 +36,7 @@ using namespace MIDI;
bool
Parser::possible_mtc (byte *sysex_buf, size_t msglen)
{
- byte fake_mtc_time[4];
+ byte fake_mtc_time[5];
if (msglen != 10 || sysex_buf[0] != 0xf0 || sysex_buf[1] != 0x7f || sysex_buf[3] != 0x01 || sysex_buf[4] != 0x01) {
return false;
@@ -50,7 +50,9 @@ Parser::possible_mtc (byte *sysex_buf, size_t msglen)
fake_mtc_time[3] = (sysex_buf[5] & 0x1f); // hours
_mtc_fps = MTC_FPS ((sysex_buf[5] & 0x60) >> 5); // fps
-
+
+ fake_mtc_time[4] = (byte) _mtc_fps;
+
/* wait for first quarter frame, which could indicate forwards
or backwards ...
*/
@@ -262,6 +264,7 @@ Parser::process_mtc_quarter_frame (byte *msg)
_qtr_mtc_time[3] |= ((msg[1] & 0x1) << 4);
_mtc_fps = MTC_FPS ((msg[1] & 0x6) >> 1);
+ _qtr_mtc_time[4] = _mtc_fps;
break;
default: