mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-17 16:11:11 +02:00
Fixed MIDI playback on Linux. Still need configure files for libscorealign and portmidi. (I tweaked makefiles by hand to build and test with EXPERIMENTAL_MIDI_OUT and EXPERIMENTAL_SCOREALIGN.) Also, I updated portmidi files, including some bug fixes from the portmidi project.
This commit is contained in:
@@ -64,6 +64,8 @@ void loopback_test()
|
||||
int data;
|
||||
PmEvent event;
|
||||
int shift;
|
||||
long total_bytes = 0;
|
||||
int32_t begin_time;
|
||||
|
||||
Pt_Start(1, 0, 0);
|
||||
|
||||
@@ -87,6 +89,7 @@ void loopback_test()
|
||||
|
||||
srand((unsigned int) Pt_Time()); /* seed for random numbers */
|
||||
|
||||
begin_time = Pt_Time();
|
||||
while (1) {
|
||||
PmError count;
|
||||
int32_t start_time;
|
||||
@@ -157,14 +160,19 @@ void loopback_test()
|
||||
}
|
||||
}
|
||||
if (error_position >= 0) {
|
||||
printf("Error at byte %d: sent %x recd %x\n", error_position,
|
||||
printf("Error at byte %d: sent %x recd %x.\n", error_position,
|
||||
expected, actual);
|
||||
break;
|
||||
} else if (i != len + 2) {
|
||||
printf("Error: byte %d not received\n", i);
|
||||
printf("Error: byte %d not received.\n", i);
|
||||
break;
|
||||
} else {
|
||||
printf("Correctly ");
|
||||
int seconds = (Pt_Time() - begin_time) / 1000;
|
||||
if (seconds == 0) seconds = 1;
|
||||
printf("Correctly received %d byte sysex message.\n", i);
|
||||
total_bytes += i;
|
||||
printf("Cummulative bytes/sec: %d\n", total_bytes / seconds);
|
||||
}
|
||||
printf("received %d byte sysex message.\n", i);
|
||||
}
|
||||
cleanup:
|
||||
Pm_Close(midi_out);
|
||||
|
Reference in New Issue
Block a user