Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0aea30e4
Commit
0aea30e4
authored
Mar 17, 2015
by
Aric Stewart
Committed by
Alexandre Julliard
Mar 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Do not wait on mixer thread exit on dsound release.
This fixes a loader deadlock if the dsound object is being released during a dll unload.
parent
0221688c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
dsound.c
dlls/dsound/dsound.c
+3
-1
dsound_private.h
dlls/dsound/dsound_private.h
+1
-0
mixer.c
dlls/dsound/mixer.c
+1
-0
No files found.
dlls/dsound/dsound.c
View file @
0aea30e4
...
...
@@ -208,8 +208,9 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
SetEvent
(
device
->
sleepev
);
if
(
device
->
thread
)
{
WaitForSingleObject
(
device
->
thread
,
INFINITE
);
WaitForSingleObject
(
device
->
thread
_finished
,
INFINITE
);
CloseHandle
(
device
->
thread
);
CloseHandle
(
device
->
thread_finished
);
}
CloseHandle
(
device
->
sleepev
);
...
...
@@ -384,6 +385,7 @@ static HRESULT DirectSoundDevice_Initialize(DirectSoundDevice ** ppDevice, LPCGU
hr
=
DSOUND_PrimaryCreate
(
device
);
if
(
hr
==
DS_OK
)
{
device
->
thread_finished
=
CreateEventW
(
0
,
0
,
0
,
0
);
device
->
thread
=
CreateThread
(
0
,
0
,
DSOUND_mixthread
,
device
,
0
,
0
);
SetThreadPriority
(
device
->
thread
,
THREAD_PRIORITY_TIME_CRITICAL
);
}
else
...
...
dlls/dsound/dsound_private.h
View file @
0aea30e4
...
...
@@ -108,6 +108,7 @@ struct DirectSoundDevice
IAudioRenderClient
*
render
;
HANDLE
sleepev
,
thread
;
HANDLE
thread_finished
;
struct
list
entry
;
};
...
...
dlls/dsound/mixer.c
View file @
0aea30e4
...
...
@@ -909,5 +909,6 @@ DWORD CALLBACK DSOUND_mixthread(void *p)
DSOUND_PerformMix
(
dev
);
RtlReleaseResource
(
&
(
dev
->
buffer_list_lock
));
}
SetEvent
(
dev
->
thread_finished
);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment