Skip to content
Snippets Groups Projects
Commit 001df25b authored by deuce's avatar deuce
Browse files

Ensure snd_pcm_drain() completes

parent b3b79eec
No related branches found
No related tags found
No related merge requests found
...@@ -632,7 +632,8 @@ void xp_play_sample_thread(void *data) ...@@ -632,7 +632,8 @@ void xp_play_sample_thread(void *data)
xptone_open(); xptone_open();
} }
else { else {
alsa_api->snd_pcm_drain(playback_handle); while(alsa_api->snd_pcm_drain(playback_handle))
SLEEP(1);
} }
} }
#endif #endif
...@@ -765,7 +766,8 @@ BOOL DLLCALL xp_play_sample(const unsigned char *sample, size_t sample_size, BOO ...@@ -765,7 +766,8 @@ BOOL DLLCALL xp_play_sample(const unsigned char *sample, size_t sample_size, BOO
xptone_open(); xptone_open();
} }
else { else {
alsa_api->snd_pcm_drain(playback_handle); while(alsa_api->snd_pcm_drain(playback_handle))
SLEEP(1);
if(must_close) if(must_close)
xptone_close(); xptone_close();
return(TRUE); return(TRUE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment