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
defa3305
Commit
defa3305
authored
Jan 18, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/dsoundrender: Use the strmbase stream lock.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e468aab0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
dsoundrender.c
dlls/quartz/dsoundrender.c
+6
-12
No files found.
dlls/quartz/dsoundrender.c
View file @
defa3305
...
...
@@ -50,7 +50,6 @@ struct dsound_render
struct
strmbase_sink
sink
;
CRITICAL_SECTION
stream_cs
;
/* Signaled when the filter has completed a state change. The filter waits
* for this event in IBaseFilter::GetState(). */
HANDLE
state_event
;
...
...
@@ -374,7 +373,7 @@ static HRESULT WINAPI dsound_render_sink_Receive(struct strmbase_sink *iface, IM
if
(
FAILED
(
hr
=
DSoundRender_PrepareReceive
(
filter
,
sample
)))
return
hr
;
EnterCriticalSection
(
&
filter
->
stream_cs
);
EnterCriticalSection
(
&
filter
->
filter
.
stream_cs
);
if
(
filter
->
filter
.
clock
&&
SUCCEEDED
(
IMediaSample_GetTime
(
sample
,
&
start
,
&
stop
)))
strmbase_passthrough_update_time
(
&
filter
->
passthrough
,
start
);
...
...
@@ -384,7 +383,7 @@ static HRESULT WINAPI dsound_render_sink_Receive(struct strmbase_sink *iface, IM
hr
=
DSoundRender_DoRenderSample
(
filter
,
sample
);
LeaveCriticalSection
(
&
filter
->
stream_cs
);
LeaveCriticalSection
(
&
filter
->
filter
.
stream_cs
);
return
hr
;
}
...
...
@@ -471,7 +470,7 @@ static HRESULT dsound_render_sink_eos(struct strmbase_sink *iface)
void
*
buffer
;
DWORD
size
;
EnterCriticalSection
(
&
filter
->
stream_cs
);
EnterCriticalSection
(
&
filter
->
filter
.
stream_cs
);
filter
->
eos
=
TRUE
;
...
...
@@ -491,7 +490,7 @@ static HRESULT dsound_render_sink_eos(struct strmbase_sink *iface)
memset
(
buffer
,
0
,
size
);
IDirectSoundBuffer_Unlock
(
filter
->
dsbuffer
,
buffer
,
size
,
NULL
,
0
);
LeaveCriticalSection
(
&
filter
->
stream_cs
);
LeaveCriticalSection
(
&
filter
->
filter
.
stream_cs
);
return
S_OK
;
}
...
...
@@ -507,7 +506,7 @@ static HRESULT dsound_render_sink_end_flush(struct strmbase_sink *iface)
{
struct
dsound_render
*
filter
=
impl_from_strmbase_pin
(
&
iface
->
pin
);
EnterCriticalSection
(
&
filter
->
stream_cs
);
EnterCriticalSection
(
&
filter
->
filter
.
stream_cs
);
filter
->
eos
=
FALSE
;
strmbase_passthrough_invalidate_time
(
&
filter
->
passthrough
);
...
...
@@ -525,7 +524,7 @@ static HRESULT dsound_render_sink_end_flush(struct strmbase_sink *iface)
filter
->
writepos
=
filter
->
buf_size
;
}
LeaveCriticalSection
(
&
filter
->
stream_cs
);
LeaveCriticalSection
(
&
filter
->
filter
.
stream_cs
);
return
S_OK
;
}
...
...
@@ -557,9 +556,6 @@ static void dsound_render_destroy(struct strmbase_filter *iface)
IPin_Disconnect
(
&
filter
->
sink
.
pin
.
IPin_iface
);
strmbase_sink_cleanup
(
&
filter
->
sink
);
filter
->
stream_cs
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
filter
->
stream_cs
);
CloseHandle
(
filter
->
state_event
);
CloseHandle
(
filter
->
flush_event
);
...
...
@@ -1051,8 +1047,6 @@ HRESULT dsound_render_create(IUnknown *outer, IUnknown **out)
strmbase_sink_init
(
&
object
->
sink
,
&
object
->
filter
,
L"Audio Input pin (rendered)"
,
&
sink_ops
,
NULL
);
InitializeCriticalSection
(
&
object
->
stream_cs
);
object
->
stream_cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": dsound_render.stream_cs"
);
object
->
state_event
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
object
->
flush_event
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
...
...
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