diff options
author | David Robillard <d@drobilla.net> | 2007-03-12 01:33:51 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-03-12 01:33:51 +0000 |
commit | 48df4a4510195c5036ff02e6c1a6b83488530e2f (patch) | |
tree | aaac9b0e6916c853c00149338831099a217808ef /tests | |
parent | 973336f178defc24f65f4e7cd581a16a27b3bed0 (diff) | |
download | raul-48df4a4510195c5036ff02e6c1a6b83488530e2f.tar.gz raul-48df4a4510195c5036ff02e6c1a6b83488530e2f.tar.bz2 raul-48df4a4510195c5036ff02e6c1a6b83488530e2f.zip |
Flowcanvas resizing, auto-arrange resizes if necessary.
Per-track SMF reading (raul and machina)
git-svn-id: http://svn.drobilla.net/lad/raul@354 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'tests')
-rw-r--r-- | tests/smf_test.cpp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/tests/smf_test.cpp b/tests/smf_test.cpp index adcb641..d4e5411 100644 --- a/tests/smf_test.cpp +++ b/tests/smf_test.cpp @@ -38,19 +38,24 @@ main(int argc, char** argv) cout << "Num tracks: " << reader.num_tracks() << endl; cout << "PPQN: " << reader.ppqn() << endl; - unsigned char buf[4]; - uint32_t ev_size; - uint32_t ev_delta_time; - while (reader.read_event(4, buf, &ev_size, &ev_delta_time) >= 0) { - - cerr << "\n\nEvent, size = " << ev_size << ", time = " << ev_delta_time << endl; - cerr << "Data: "; - cerr.flags(ios::hex); - for (uint32_t i=0; i < ev_size; ++i) { - cerr << "0x" << (int)buf[i] << " "; + for (unsigned t=1; t <= reader.num_tracks(); ++t) { + cout << "******** Track " << t << " ********" << endl; + reader.seek_to_track(t); + + unsigned char buf[4]; + uint32_t ev_size; + uint32_t ev_delta_time; + while (reader.read_event(4, buf, &ev_size, &ev_delta_time) >= 0) { + + cout << "\n\nEvent, size = " << ev_size << ", time = " << ev_delta_time; + cout << ", data = "; + cout.flags(ios::hex); + for (uint32_t i=0; i < ev_size; ++i) { + cout << "0x" << (int)buf[i] << " "; + } + cout.flags(ios::dec); + cout << endl; } - cerr.flags(ios::dec); - cerr << endl; } return 0; |