diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2018-09-18 18:51:59 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2018-09-18 19:06:04 -0400 |
commit | e6915e01de2e2167c3384c6c8f2408f763971616 (patch) | |
tree | c67200eda4cf4c595503a850fe6ae72d89032a6f /libs/midi++2 | |
parent | 7390b88c2bb29b1b34624f441adec1e71c74bad8 (diff) |
new transport slave/master implementation, libs/ edition
Diffstat (limited to 'libs/midi++2')
-rw-r--r-- | libs/midi++2/midi++/parser.h | 5 | ||||
-rw-r--r-- | libs/midi++2/parser.cc | 12 |
2 files changed, 9 insertions, 8 deletions
diff --git a/libs/midi++2/midi++/parser.h b/libs/midi++2/midi++/parser.h index 3b1dd47052..0ccef6e66f 100644 --- a/libs/midi++2/midi++/parser.h +++ b/libs/midi++2/midi++/parser.h @@ -42,6 +42,7 @@ typedef PBD::Signal2<void,Parser &, pitchbend_t> PitchBendSignal; typedef PBD::Signal3<void,Parser &, uint16_t, int> RPNSignal; typedef PBD::Signal3<void,Parser &, uint16_t, float> RPNValueSignal; typedef PBD::Signal3<void,Parser &, byte *, size_t> Signal; +typedef PBD::Signal4<void,Parser &, byte *, size_t, samplecnt_t> AnySignal; class LIBMIDIPP_API Parser { public: @@ -86,7 +87,7 @@ class LIBMIDIPP_API Parser { Signal mtc; Signal raw_preparse; Signal raw_postparse; - Signal any; + AnySignal any; Signal sysex; Signal mmc; Signal position; @@ -147,7 +148,7 @@ class LIBMIDIPP_API Parser { std::ostream *trace_stream; std::string trace_prefix; - void trace_event (Parser &p, byte *msg, size_t len); + void trace_event (Parser &p, byte *msg, size_t len, samplecnt_t); PBD::ScopedConnection trace_connection; size_t message_counter[256]; diff --git a/libs/midi++2/parser.cc b/libs/midi++2/parser.cc index 9866d41632..599f8764f1 100644 --- a/libs/midi++2/parser.cc +++ b/libs/midi++2/parser.cc @@ -136,7 +136,7 @@ Parser::~Parser () } void -Parser::trace_event (Parser &, MIDI::byte *msg, size_t len) +Parser::trace_event (Parser &, MIDI::byte *msg, size_t len, samplecnt_t /*when*/) { eventType type; ostream *o; @@ -313,7 +313,7 @@ Parser::trace (bool onoff, ostream *o, const string &prefix) if (onoff) { trace_stream = o; trace_prefix = prefix; - any.connect_same_thread (trace_connection, boost::bind (&Parser::trace_event, this, _1, _2, _3)); + any.connect_same_thread (trace_connection, boost::bind (&Parser::trace_event, this, _1, _2, _3, _4)); } else { trace_prefix = ""; trace_stream = 0; @@ -440,7 +440,7 @@ Parser::scanner (unsigned char inbyte) } } if (!_offline) { - any (*this, msgbuf, msgindex); + any (*this, msgbuf, msgindex, _timestamp); } } } @@ -572,7 +572,7 @@ Parser::realtime_msg(unsigned char inbyte) break; } - any (*this, &inbyte, 1); + any (*this, &inbyte, 1, _timestamp); } @@ -661,7 +661,7 @@ Parser::system_msg (unsigned char inbyte) // all these messages will be sent via any() // when they are complete. - // any (*this, &inbyte, 1); + // any (*this, &inbyte, 1, _timestamp); } void @@ -764,7 +764,7 @@ Parser::signal (MIDI::byte *msg, size_t len) break; } - any (*this, msg, len); + any (*this, msg, len, _timestamp); } bool |