diff options
Diffstat (limited to 'src/engine/smf_test.cpp')
-rw-r--r-- | src/engine/smf_test.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/engine/smf_test.cpp b/src/engine/smf_test.cpp index 4787b7d..ce0a7d6 100644 --- a/src/engine/smf_test.cpp +++ b/src/engine/smf_test.cpp @@ -1,5 +1,5 @@ /* - This file is part of Raul. + This file is part of Machina. Copyright 2007-2012 David Robillard <http://drobilla.net> Raul is free software: you can redistribute it and/or modify it under the @@ -28,9 +28,12 @@ main(int argc, char** argv) { #define CHECK(cond) \ do { if (!(cond)) { \ - error << "Test at " << __FILE__ << ":" << __LINE__ << " failed: " << __STRING(cond) << endl; \ - return 1; \ - } } while (0) + error << "Test at " << __FILE__ << ":" << __LINE__ \ + << " failed: " << __STRING(cond) << endl; \ + return 1; \ + } \ + } \ + while (0) static const uint16_t ppqn = 19200; @@ -46,7 +49,7 @@ main(int argc, char** argv) } SMFReader reader; - bool opened = reader.open(filename); + bool opened = reader.open(filename); if (!opened) { cerr << "Unable to open SMF file " << filename << endl; @@ -57,7 +60,7 @@ main(int argc, char** argv) CHECK(reader.num_tracks() == 1); CHECK(reader.ppqn() == ppqn); - for (unsigned t=1; t <= reader.num_tracks(); ++t) { + for (unsigned t = 1; t <= reader.num_tracks(); ++t) { reader.seek_to_track(t); unsigned char buf[4]; @@ -65,10 +68,11 @@ main(int argc, char** argv) uint32_t ev_delta_time; while (reader.read_event(4, buf, &ev_size, &ev_delta_time) >= 0) { - cout << t << ": Event, size = " << ev_size << ", time = " << ev_delta_time; + cout << t << ": Event, size = " << ev_size << ", time = " + << ev_delta_time; cout << ":\t"; cout.flags(ios::hex); - for (uint32_t i=0; i < ev_size; ++i) { + for (uint32_t i = 0; i < ev_size; ++i) { cout << "0x" << static_cast<int>(buf[i]) << " "; } cout.flags(ios::dec); |