diff options
author | Carl Hetherington <carl@carlh.net> | 2010-12-03 22:26:29 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-12-03 22:26:29 +0000 |
commit | 73192bc1a7ea55fa1864dc3826845b15c00dd2ec (patch) | |
tree | c0039f3f5a848aed6e880abf11519dad855fa899 /libs/midi++2/midi++ | |
parent | 74b4a3c77b08dc1e58274875604eb73e8492fa93 (diff) |
Remove all use of nframes_t.
git-svn-id: svn://localhost/ardour2/branches/3.0@8166 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2/midi++')
-rw-r--r-- | libs/midi++2/midi++/channel.h | 2 | ||||
-rw-r--r-- | libs/midi++2/midi++/manager.h | 4 | ||||
-rw-r--r-- | libs/midi++2/midi++/mmc.h | 6 | ||||
-rw-r--r-- | libs/midi++2/midi++/parser.h | 16 | ||||
-rw-r--r-- | libs/midi++2/midi++/port.h | 12 | ||||
-rw-r--r-- | libs/midi++2/midi++/types.h | 6 |
6 files changed, 25 insertions, 21 deletions
diff --git a/libs/midi++2/midi++/channel.h b/libs/midi++2/midi++/channel.h index 7afaffb274..162eea1e9a 100644 --- a/libs/midi++2/midi++/channel.h +++ b/libs/midi++2/midi++/channel.h @@ -141,7 +141,7 @@ class Channel : public PBD::ScopedConnectionList { bool _mono; size_t _notes_on; - void reset (timestamp_t timestamp, nframes_t nframes, bool notes_off = true); + void reset (timestamp_t timestamp, framecnt_t nframes, bool notes_off = true); void process_note_off (Parser &, EventTwoBytes *); void process_note_on (Parser &, EventTwoBytes *); diff --git a/libs/midi++2/midi++/manager.h b/libs/midi++2/midi++/manager.h index 915f650c9d..dec9d0d9f1 100644 --- a/libs/midi++2/midi++/manager.h +++ b/libs/midi++2/midi++/manager.h @@ -39,14 +39,14 @@ class Manager { * This MUST be called before any reading/writing for this cycle. * Realtime safe. */ - void cycle_start(nframes_t nframes); + void cycle_start (pframes_t nframes); /** Signal the end of an audio cycle. * This signifies that the cycle began with @ref cycle_start has ended. * This MUST be called at the end of each cycle. * Realtime safe. */ - void cycle_end(); + void cycle_end (); MachineControl* mmc () const { return _mmc; } Port *mtc_input_port() const { return _mtc_input_port; } diff --git a/libs/midi++2/midi++/mmc.h b/libs/midi++2/midi++/mmc.h index 65d91686b3..cc8891db2c 100644 --- a/libs/midi++2/midi++/mmc.h +++ b/libs/midi++2/midi++/mmc.h @@ -270,9 +270,9 @@ class MachineControl int do_shuttle (byte *, size_t len); void write_track_status (byte *, size_t len, byte reg); - void spp_start (Parser&, nframes_t); - void spp_continue (Parser&, nframes_t); - void spp_stop (Parser&, nframes_t); + void spp_start (Parser&, framecnt_t); + void spp_continue (Parser&, framecnt_t); + void spp_stop (Parser&, framecnt_t); }; /** Class to describe a MIDI machine control command to be sent. diff --git a/libs/midi++2/midi++/parser.h b/libs/midi++2/midi++/parser.h index 43cf80c067..e57323e72d 100644 --- a/libs/midi++2/midi++/parser.h +++ b/libs/midi++2/midi++/parser.h @@ -33,7 +33,7 @@ class Port; class Parser; typedef PBD::Signal1<void,Parser&> ZeroByteSignal; -typedef PBD::Signal2<void,Parser&,nframes_t> TimestampedSignal; +typedef PBD::Signal2<void,Parser&,framecnt_t> TimestampedSignal; typedef PBD::Signal2<void,Parser&, byte> OneByteSignal; typedef PBD::Signal2<void,Parser &, EventTwoBytes *> TwoByteSignal; typedef PBD::Signal2<void,Parser &, pitchbend_t> PitchBendSignal; @@ -49,8 +49,8 @@ class Parser { 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; } + framecnt_t get_timestamp() const { return _timestamp; } + void set_timestamp (const framecnt_t timestamp) { _timestamp = timestamp; } /* signals that anyone can connect to */ @@ -124,10 +124,10 @@ class Parser { const byte *mtc_current() const { return _mtc_time; } bool mtc_locked() const { return _mtc_locked; } - PBD::Signal3<void,Parser&,int,nframes_t> mtc_qtr; - PBD::Signal3<void,const byte*,bool,nframes_t> mtc_time; - PBD::Signal1<void,MTC_Status> mtc_status; - PBD::Signal0<bool> mtc_skipped; + PBD::Signal3<void, Parser &, int, framecnt_t> mtc_qtr; + PBD::Signal3<void, const byte *, bool, framecnt_t> mtc_time; + PBD::Signal1<void, MTC_Status> mtc_status; + PBD::Signal0<bool> mtc_skipped; void set_mtc_forwarding (bool yn) { _mtc_forward = yn; @@ -172,7 +172,7 @@ class Parser { bool _mtc_locked; byte last_qtr_frame; - nframes_t _timestamp; + framecnt_t _timestamp; ParseState pre_variable_state; MIDI::eventType pre_variable_msgtype; diff --git a/libs/midi++2/midi++/port.h b/libs/midi++2/midi++/port.h index d0b6249ebe..f7bef36b1f 100644 --- a/libs/midi++2/midi++/port.h +++ b/libs/midi++2/midi++/port.h @@ -57,9 +57,9 @@ class Port { // FIXME: make Manager a friend of port so these can be hidden? /* Only for use by MidiManager. Don't ever call this. */ - void cycle_start(nframes_t nframes); + void cycle_start (pframes_t nframes); /* Only for use by MidiManager. Don't ever call this. */ - void cycle_end(); + void cycle_end (); /** Write a message to port. * @param msg Raw MIDI message to send @@ -76,7 +76,7 @@ class Port { */ int read (byte *buf, size_t bufsize); - void parse (nframes_t timestamp); + void parse (framecnt_t timestamp); /** Write a message to port. * @return true on success. @@ -124,7 +124,7 @@ class Port { XMLNode& get_state(); }; - nframes_t nframes_this_cycle() const { return _nframes_this_cycle; } + pframes_t nframes_this_cycle() const { return _nframes_this_cycle; } void reestablish (jack_client_t *); void reconnect (); @@ -141,7 +141,7 @@ class Port { private: bool _ok; bool _currently_in_cycle; - nframes_t _nframes_this_cycle; + pframes_t _nframes_this_cycle; std::string _tagname; size_t _number; Channel *_channel[16]; @@ -151,7 +151,7 @@ private: jack_client_t* _jack_client; jack_port_t* _jack_port; - nframes_t _last_read_index; + framecnt_t _last_read_index; timestamp_t _last_write_timestamp; /** Channel used to signal to the MidiControlUI that input has arrived */ diff --git a/libs/midi++2/midi++/types.h b/libs/midi++2/midi++/types.h index a7929e16f5..185e1e6f3f 100644 --- a/libs/midi++2/midi++/types.h +++ b/libs/midi++2/midi++/types.h @@ -20,6 +20,7 @@ #ifndef __midi_types_h__ #define __midi_types_h__ +#include <jack/jack.h> #include <inttypes.h> namespace MIDI { @@ -28,9 +29,12 @@ namespace MIDI { typedef float controller_value_t; typedef unsigned char byte; typedef unsigned short pitchbend_t; - typedef uint32_t nframes_t; typedef uint32_t timestamp_t; + /** XXX: dupes from libardour */ + typedef int64_t framecnt_t; + typedef jack_nframes_t pframes_t; + enum eventType { none = 0x0, raw = 0xF4, /* undefined in MIDI spec */ |