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
c9950119
Commit
c9950119
authored
Jan 15, 2012
by
Jörg Höhle
Committed by
Alexandre Julliard
Jan 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Avoid deadlock in AudioClient_Stop.
parent
051cb8e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
mmdevdrv.c
dlls/winecoreaudio.drv/mmdevdrv.c
+18
-4
No files found.
dlls/winecoreaudio.drv/mmdevdrv.c
View file @
c9950119
...
...
@@ -1440,8 +1440,12 @@ static HRESULT WINAPI AudioClient_Start(IAudioClient *iface)
if
(
This
->
event
)
if
(
!
CreateTimerQueueTimer
(
&
This
->
timer
,
g_timer_q
,
ca_period_cb
,
This
,
0
,
This
->
period_ms
,
0
))
ERR
(
"Unable to create timer: %u
\n
"
,
GetLastError
());
ca_period_cb
,
This
,
0
,
This
->
period_ms
,
0
)){
This
->
timer
=
NULL
;
OSSpinLockUnlock
(
&
This
->
lock
);
WARN
(
"Unable to create timer: %u
\n
"
,
GetLastError
());
return
E_OUTOFMEMORY
;
}
This
->
playing
=
StateInTransition
;
...
...
@@ -1467,6 +1471,8 @@ static HRESULT WINAPI AudioClient_Stop(IAudioClient *iface)
ACImpl
*
This
=
impl_from_IAudioClient
(
iface
);
AudioTimeStamp
tstamp
;
OSStatus
sc
;
HANDLE
event
=
NULL
;
BOOL
wait
=
FALSE
;
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -1487,9 +1493,13 @@ static HRESULT WINAPI AudioClient_Stop(IAudioClient *iface)
return
S_OK
;
}
if
(
This
->
timer
&&
This
->
timer
!=
INVALID_HANDLE_VALUE
){
DeleteTimerQueueTimer
(
g_timer_q
,
This
->
timer
,
INVALID_HANDLE_VALUE
);
if
(
This
->
timer
){
event
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
wait
=
!
DeleteTimerQueueTimer
(
g_timer_q
,
This
->
timer
,
event
);
This
->
timer
=
NULL
;
if
(
wait
)
WARN
(
"DeleteTimerQueueTimer error %u
\n
"
,
GetLastError
());
wait
=
wait
&&
GetLastError
()
==
ERROR_IO_PENDING
;
}
This
->
playing
=
StateInTransition
;
...
...
@@ -1506,6 +1516,10 @@ static HRESULT WINAPI AudioClient_Stop(IAudioClient *iface)
OSSpinLockUnlock
(
&
This
->
lock
);
if
(
event
&&
wait
)
WaitForSingleObject
(
event
,
INFINITE
);
CloseHandle
(
event
);
sc
=
AudioQueueFlush
(
This
->
aqueue
);
if
(
sc
!=
noErr
)
WARN
(
"Unable to flush audio queue: %lx
\n
"
,
sc
);
...
...
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