summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-03-10 03:14:34 +0000
committerDavid Robillard <d@drobilla.net>2007-03-10 03:14:34 +0000
commit79048eff961c01047834909e3323004bff8061cd (patch)
tree5830d5a879ba5fb261269fea7d43a91db9ecb9cd /tests
parent8b6b314cce7a721e828ecb022f2b5400aa05c07c (diff)
downloadraul-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 'tests')
-rw-r--r--tests/smf_test.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/smf_test.cpp b/tests/smf_test.cpp
index 84f61cc..219660d 100644
--- a/tests/smf_test.cpp
+++ b/tests/smf_test.cpp
@@ -34,8 +34,24 @@ main(int argc, char** argv)
cout << "Opened SMF file " << filename << endl;
+ cout << "Type: " << reader.type() << endl;
cout << "Num tracks: " << reader.num_tracks() << endl;
cout << "PPQN: " << reader.ppqn() << endl;
+ unsigned char buf[4];
+ uint32_t ev_size;
+ uint64_t ev_time;
+ while (reader.read_event(4, buf, &ev_size, &ev_time) >= 0) {
+
+ cerr << "\n\nEvent, size = " << ev_size << ", time = " << ev_time << endl;
+ cerr << "Data: ";
+ cerr.flags(ios::hex);
+ for (uint32_t i=0; i < ev_size; ++i) {
+ cerr << "0x" << (int)buf[i] << " ";
+ }
+ cerr.flags(ios::dec);
+ cerr << endl;
+ }
+
return 0;
}