Midi test1: style fixes.
This commit is contained in:
@@ -4,14 +4,14 @@
|
|||||||
#include <iostream.h>
|
#include <iostream.h>
|
||||||
|
|
||||||
int main(int argc, char * argv[]) {
|
int main(int argc, char * argv[]) {
|
||||||
if(argc < 2) {
|
if (argc < 2) {
|
||||||
cerr << "Must supply a filename (*.mid)!" << endl;
|
cerr << "Must supply a filename (*.mid)!" << endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
BMidiText * text = new BMidiText();
|
BMidiText * text = new BMidiText();
|
||||||
BMidiStore * store = new BMidiStore();
|
BMidiStore * store = new BMidiStore();
|
||||||
BEntry entry(argv[1],true);
|
BEntry entry(argv[1], true);
|
||||||
if(!entry.Exists()) {
|
if (!entry.Exists()) {
|
||||||
cerr << "File does not exist." << endl;
|
cerr << "File does not exist." << endl;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@@ -21,7 +21,7 @@ int main(int argc, char * argv[]) {
|
|||||||
store->Connect(text);
|
store->Connect(text);
|
||||||
uint32 start_time = B_NOW;
|
uint32 start_time = B_NOW;
|
||||||
store->Start();
|
store->Start();
|
||||||
while(store->IsRunning()) {
|
while (store->IsRunning()) {
|
||||||
snooze(100000);
|
snooze(100000);
|
||||||
}
|
}
|
||||||
store->Stop();
|
store->Stop();
|
||||||
@@ -29,7 +29,7 @@ int main(int argc, char * argv[]) {
|
|||||||
cout << "Start Time: " << dec << start_time << "ms" << endl;
|
cout << "Start Time: " << dec << start_time << "ms" << endl;
|
||||||
cout << "Stop Time: " << dec << stop_time << "ms" << endl;
|
cout << "Stop Time: " << dec << stop_time << "ms" << endl;
|
||||||
cout << "Total time: " << dec << stop_time - start_time << "ms" << endl;
|
cout << "Total time: " << dec << stop_time - start_time << "ms" << endl;
|
||||||
|
|
||||||
store->Disconnect(text);
|
store->Disconnect(text);
|
||||||
delete store;
|
delete store;
|
||||||
delete text;
|
delete text;
|
||||||
|
|||||||
Reference in New Issue
Block a user