diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-01 18:31:00 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-01 18:31:00 +0000 |
commit | b825b86862223862f2cd23e08d204b2de657b4b7 (patch) | |
tree | 3d0459a362000625c82d51886d0b9ba3b79f1201 /libs/midi++2/midi++/parser.h | |
parent | ce2d9cb4aacae917fd9117d923f124a8d5ecde2d (diff) |
generalize hans' midi_clock_timestamp to be a general timestamp for incoming MIDI data (from JACK); make JACK_MidiPort::read() abort, because it should never ever be called; make JACK_MidiPort::~JackMIDIPort() unregister ports when it is destroyed; pass along the timestamp to MTC qtr and full signals
git-svn-id: svn://localhost/ardour2/branches/3.0@6254 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2/midi++/parser.h')
-rw-r--r-- | libs/midi++2/midi++/parser.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/libs/midi++2/midi++/parser.h b/libs/midi++2/midi++/parser.h index ea89076225..b8364cc025 100644 --- a/libs/midi++2/midi++/parser.h +++ b/libs/midi++2/midi++/parser.h @@ -41,7 +41,15 @@ class Parser : public sigc::trackable { public: Parser (Port &p); ~Parser (); + + /* sets the time that will be reported for any MTC or MIDI Clock + message the next time ::scanner() parses such a message. It should + therefore be set before every byte passed into ::scanner(). + */ + nframes_t get_timestamp() const { return _timestamp; } + void set_timestamp (const nframes_t timestamp) { _timestamp = timestamp; } + /* signals that anyone can connect to */ OneByteSignal bank_change; @@ -64,8 +72,8 @@ class Parser : public sigc::trackable { sigc::signal<void, Parser &> channel_active_preparse[16]; sigc::signal<void, Parser &> channel_active_postparse[16]; - OneByteSignal mtc_quarter_frame; - + OneByteSignal mtc_quarter_frame; /* see below for more useful signals */ + Signal mtc; Signal raw_preparse; Signal raw_postparse; Signal any; @@ -74,9 +82,6 @@ class Parser : public sigc::trackable { Signal position; Signal song; - Signal mtc; - sigc::signal<void,Parser&,int> mtc_qtr; - sigc::signal<void, Parser &> all_notes_off; sigc::signal<void, Parser &> tune; sigc::signal<void, Parser &, nframes_t> timing; @@ -122,12 +127,10 @@ class Parser : public sigc::trackable { const byte *mtc_current() const { return _mtc_time; } bool mtc_locked() const { return _mtc_locked; } - nframes_t get_midi_clock_timestamp() const { return _midi_clock_timestamp; } - void set_midi_clock_timestamp(const nframes_t timestamp) { _midi_clock_timestamp = timestamp; } - - sigc::signal<void,MTC_Status> mtc_status; - sigc::signal<bool> mtc_skipped; - sigc::signal<void,const byte*,bool> mtc_time; + sigc::signal<void,Parser&,int,nframes_t> mtc_qtr; + sigc::signal<void,const byte*,bool,nframes_t> mtc_time; + sigc::signal<void,MTC_Status> mtc_status; + sigc::signal<bool> mtc_skipped; void set_mtc_forwarding (bool yn) { _mtc_forward = yn; @@ -172,7 +175,7 @@ class Parser : public sigc::trackable { bool _mtc_locked; byte last_qtr_frame; - nframes_t _midi_clock_timestamp; + nframes_t _timestamp; ParseState pre_variable_state; MIDI::eventType pre_variable_msgtype; |