Removed redundant wait at shutdown in the ALSA audio driver
This commit is contained in:
@@ -484,12 +484,6 @@ static void ALSA_CloseDevice(SDL_AudioDevice *device)
|
|||||||
{
|
{
|
||||||
if (device->hidden) {
|
if (device->hidden) {
|
||||||
if (device->hidden->pcm) {
|
if (device->hidden->pcm) {
|
||||||
// Wait for the submitted audio to drain. ALSA_snd_pcm_drop() can hang, so don't use that.
|
|
||||||
int delay = ((device->sample_frames * 1000) / device->spec.freq) * 2;
|
|
||||||
if (delay > 100) {
|
|
||||||
delay = 100;
|
|
||||||
}
|
|
||||||
SDL_Delay(delay);
|
|
||||||
ALSA_snd_pcm_close(device->hidden->pcm);
|
ALSA_snd_pcm_close(device->hidden->pcm);
|
||||||
}
|
}
|
||||||
SDL_free(device->hidden->mixbuf);
|
SDL_free(device->hidden->mixbuf);
|
||||||
|
|||||||
Reference in New Issue
Block a user