Skip to content
Snippets Groups Projects
Commit 8a710ab0 authored by rswindell's avatar rswindell
Browse files

Revert to BEEP() for the time-being (xpbeep is not working so great on Win32).

Bug-fix in cterm_end() - use listSemPost() to signal list semaphore (and get
playnote_thread to terminate).
parent 12e5f7ff
Branches
Tags
No related merge requests found
......@@ -211,7 +211,7 @@ void playnote_thread(void *args)
}
duration-=pauselen;
if(note->notenum < 72 && note->notenum >= 0)
xpbeep(((double)note_frequency[note->notenum])/1000,duration);
BEEP(((double)note_frequency[note->notenum])/1000,duration);
else
SLEEP(duration);
SLEEP(pauselen);
......@@ -1507,7 +1507,7 @@ void cterm_end(void)
}
if(playnote_thread_running) {
if(sem_trywait(&playnote_thread_terminated)==-1) {
listPushNode(&notes, NULL);
listSemPost(&notes);
sem_wait(&playnote_thread_terminated);
}
sem_destroy(&playnote_thread_terminated);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment