Skip to content
Snippets Groups Projects
Commit 50bd40c7 authored by Chris Morgan's avatar Chris Morgan Committed by Alexandre Julliard
Browse files

Reset the oss device before we try to close it. Fixes hang on startup

of Starcraft due to oss device being in a bad state.
parent d197d402
No related branches found
No related tags found
No related merge requests found
......@@ -369,7 +369,12 @@ static DWORD OSS_OpenDevice(OSS_DEVICE* ossdev, unsigned req_access,
*/
static void OSS_CloseDevice(OSS_DEVICE* ossdev)
{
if (--ossdev->open_count == 0) close(ossdev->fd);
if (--ossdev->open_count == 0)
{
/* reset the device before we close it in case it is in a bad state */
ioctl(ossdev->fd, SNDCTL_DSP_RESET, 0);
close(ossdev->fd);
}
}
/******************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment