Reset the device before closing it - fixes a hang with some audio drivers
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40249
This commit is contained in:
parent
0d4c3555ab
commit
b3136f3c32
1 changed files with 2 additions and 0 deletions
|
@ -233,6 +233,8 @@ static void DSP_CloseAudio(_THIS)
|
||||||
mixbuf = NULL;
|
mixbuf = NULL;
|
||||||
}
|
}
|
||||||
if ( audio_fd >= 0 ) {
|
if ( audio_fd >= 0 ) {
|
||||||
|
int value;
|
||||||
|
ioctl(audio_fd, SNDCTL_DSP_RESET, &value);
|
||||||
close(audio_fd);
|
close(audio_fd);
|
||||||
audio_fd = -1;
|
audio_fd = -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue