From 48df4a4510195c5036ff02e6c1a6b83488530e2f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 12 Mar 2007 01:33:51 +0000 Subject: 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 --- tests/smf_test.cpp | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'tests/smf_test.cpp') 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; -- cgit v1.2.1