mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-10 16:43:33 +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:
@@ -40,6 +40,7 @@ CHANGE LOG
|
||||
static int time_started_flag = FALSE;
|
||||
static struct timeb time_offset = {0, 0, 0, 0};
|
||||
static pthread_t pt_thread_pid;
|
||||
static int pt_thread_created = FALSE;
|
||||
|
||||
/* note that this is static data -- we only need one copy */
|
||||
typedef struct {
|
||||
@@ -91,6 +92,7 @@ PtError Pt_Start(int resolution, PtCallback *callback, void *userData)
|
||||
res = pthread_create(&pt_thread_pid, NULL,
|
||||
Pt_CallbackProc, parms);
|
||||
if (res != 0) return ptHostError;
|
||||
pt_thread_created = TRUE;
|
||||
}
|
||||
time_started_flag = TRUE;
|
||||
return ptNoError;
|
||||
@@ -101,7 +103,10 @@ PtError Pt_Stop()
|
||||
{
|
||||
/* printf("Pt_Stop called\n"); */
|
||||
pt_callback_proc_id++;
|
||||
pthread_join(pt_thread_pid, NULL);
|
||||
if (pt_thread_created) {
|
||||
pthread_join(pt_thread_pid, NULL);
|
||||
pt_thread_created = FALSE;
|
||||
}
|
||||
time_started_flag = FALSE;
|
||||
return ptNoError;
|
||||
}
|
||||
|
Reference in New Issue
Block a user