diff options
author | David Robillard <d@drobilla.net> | 2007-03-10 03:14:34 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-03-10 03:14:34 +0000 |
commit | 79048eff961c01047834909e3323004bff8061cd (patch) | |
tree | 5830d5a879ba5fb261269fea7d43a91db9ecb9cd /raul | |
parent | 8b6b314cce7a721e828ecb022f2b5400aa05c07c (diff) | |
download | raul-79048eff961c01047834909e3323004bff8061cd.tar.gz raul-79048eff961c01047834909e3323004bff8061cd.tar.bz2 raul-79048eff961c01047834909e3323004bff8061cd.zip |
SMF reading fixes (correctly read running status, etc).
git-svn-id: http://svn.drobilla.net/lad/raul@346 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul')
-rw-r--r-- | raul/SMFReader.h | 8 | ||||
-rw-r--r-- | raul/midi_events.h | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/raul/SMFReader.h b/raul/SMFReader.h index 3878044..4bced9e 100644 --- a/raul/SMFReader.h +++ b/raul/SMFReader.h @@ -34,11 +34,11 @@ public: bool open(const std::string& filename); + uint16_t type() const { return _type; } uint16_t ppqn() const { return _ppqn; } + size_t num_tracks() { return _num_tracks; } - size_t num_tracks() throw (std::logic_error); - - int read_event(size_t buf_len, char* buf, size_t* ev_size, uint64_t* ev_time); + int read_event(size_t buf_len, unsigned char* buf, uint32_t* ev_size, uint64_t* ev_time); void close(); @@ -52,6 +52,8 @@ protected: std::string _filename; FILE* _fd; + uint16_t _type; + uint16_t _num_tracks; uint16_t _ppqn; uint64_t _last_ev_time; uint32_t _track_size; diff --git a/raul/midi_events.h b/raul/midi_events.h index 5c1183e..a298a87 100644 --- a/raul/midi_events.h +++ b/raul/midi_events.h @@ -90,7 +90,6 @@ #define MIDI_CTL_SUSTAIN 0x40 /**< Sustain pedal */ #define MIDI_CTL_PORTAMENTO 0x41 /**< Portamento */ #define MIDI_CTL_SOSTENUTO 0x42 /**< Sostenuto */ -#define MIDI_CTL_SUSTENUTO 0x42 /**< Sostenuto (a typo in the older version) */ #define MIDI_CTL_SOFT_PEDAL 0x43 /**< Soft pedal */ #define MIDI_CTL_LEGATO_FOOTSWITCH 0x44 /**< Legato foot switch */ #define MIDI_CTL_HOLD2 0x45 /**< Hold2 */ |