diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/sudoku.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/sudoku.cxx b/test/sudoku.cxx index 6eadbcb6a..5dd58724c 100644 --- a/test/sudoku.cxx +++ b/test/sudoku.cxx @@ -418,19 +418,19 @@ SudokuSound::audio_cb(AudioDeviceID device, } #endif // __APPLE__ -#define NOTE_DURATION_MS 50 +#define NOTE_DURATION 50 -// Play a note for 250ms... +// Play a note for <NOTE_DURATION> ms... void SudokuSound::play(char note) { Fl::check(); - + #ifdef __APPLE__ // Point to the next note... data = sample_data[note - 'A']; remaining = sample_size * 2; // Wait for the sound to complete... - Fl::msleep(NOTE_DURATION_MS); + usleep(NOTE_DURATION*1000); #elif defined(WIN32) if (sample_size) { @@ -438,8 +438,8 @@ void SudokuSound::play(char note) { waveOutWrite(device, header_ptr, sizeof(WAVEHDR)); - Fl::msleep(NOTE_DURATION_MS); - } else Beep(frequencies[note - 'A'], NOTE_DURATION_MS); + Sleep(NOTE_DURATION); + } else Beep(frequencies[note - 'A'], NOTE_DURATION); #else # ifdef HAVE_ALSA_ASOUNDLIB_H @@ -449,7 +449,7 @@ void SudokuSound::play(char note) { snd_pcm_prepare(handle); snd_pcm_writei(handle, sample_data[note - 'A'], sample_size); } - Fl::msleep(NOTE_DURATION_MS); + usleep(NOTE_DURATION*1000); return; } # endif // HAVE_ALSA_ASOUNDLIB_H @@ -464,7 +464,7 @@ void SudokuSound::play(char note) { // Sound a tone for the given note... control.bell_percent = 100; control.bell_pitch = frequencies[note - 'A']; - control.bell_duration = NOTE_DURATION_MS; + control.bell_duration = NOTE_DURATION; XChangeKeyboardControl(fl_display, KBBellPercent | KBBellPitch | KBBellDuration, |
