summaryrefslogtreecommitdiff
path: root/libs/midi++2/mtc.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-01-27 03:26:41 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-01-27 03:26:41 +0000
commit4dc34d5fd9f7d400c60f4a3aac14804b0f4c4e20 (patch)
tree4db73592f1de3da66592763903fac5baa57ee20a /libs/midi++2/mtc.cc
parente24148d9d7af6f2c22b6faf49dfc6b89ec67fc6f (diff)
something for chris g. to try when he gets up before me
git-svn-id: svn://localhost/ardour2/branches/3.0@6573 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2/mtc.cc')
-rw-r--r--libs/midi++2/mtc.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/libs/midi++2/mtc.cc b/libs/midi++2/mtc.cc
index d7c089eecd..32fb8cf3d6 100644
--- a/libs/midi++2/mtc.cc
+++ b/libs/midi++2/mtc.cc
@@ -185,7 +185,9 @@ Parser::process_mtc_quarter_frame (byte *msg)
true, just ignore this in terms of it being an error.
*/
- if (1) { /* mtc_skipped () */
+ boost::optional<bool> res = mtc_skipped ();
+
+ if (res.get_value_or (false)) {
/* no error, reset next expected frame */
@@ -217,17 +219,12 @@ Parser::process_mtc_quarter_frame (byte *msg)
return;
}
- /* go back to waiting for the first frame */
-
- expected_mtc_quarter_frame_code = 0;
- memset (_qtr_mtc_time, 0, sizeof (_qtr_mtc_time));
-
- _mtc_running = MTC_Stopped;
- _mtc_locked = false;
+ /* skip counts as an error ... go back to waiting for the first frame */
#ifdef DEBUG_MTC
cerr << "Skipped MTC qtr frame, return to stopped state" << endl;
#endif
+ reset_mtc_state ();
mtc_status (MTC_Stopped);
return;