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
868dd534
Commit
868dd534
authored
Mar 10, 2007
by
Chris Robinson
Committed by
Alexandre Julliard
Mar 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Stop DSound buffer playback when the filter is paused or stopped, not…
quartz: Stop DSound buffer playback when the filter is paused or stopped, not the next time it's processed.
parent
79d4dfb6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
13 deletions
+33
-13
dsoundrender.c
dlls/quartz/dsoundrender.c
+33
-13
No files found.
dlls/quartz/dsoundrender.c
View file @
868dd534
...
...
@@ -166,17 +166,6 @@ static HRESULT DSoundRender_SendSampleData(DSoundRenderImpl* This, LPBYTE data,
DWORD
size2
;
DWORD
play_pos
,
buf_free
;
if
(
This
->
state
!=
State_Running
)
{
DWORD
state
;
if
(
SUCCEEDED
(
IDirectSoundBuffer_GetStatus
(
This
->
dsbuffer
,
&
state
)))
{
if
(
state
&
DSBSTATUS_PLAYING
)
{
IDirectSoundBuffer_Stop
(
This
->
dsbuffer
);
This
->
started
=
FALSE
;
}
}
return
S_OK
;
}
while
(
1
)
{
hr
=
IDirectSoundBuffer_GetCurrentPosition
(
This
->
dsbuffer
,
&
play_pos
,
NULL
);
...
...
@@ -241,6 +230,9 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample)
HRESULT
hr
;
TRACE
(
"%p %p
\n
"
,
iface
,
pSample
);
if
(
This
->
state
!=
State_Running
)
return
VFW_E_WRONG_STATE
;
hr
=
IMediaSample_GetPointer
(
pSample
,
&
pbSrcStream
);
if
(
FAILED
(
hr
))
...
...
@@ -452,7 +444,21 @@ static HRESULT WINAPI DSoundRender_Stop(IBaseFilter * iface)
EnterCriticalSection
(
&
This
->
csFilter
);
{
This
->
state
=
State_Stopped
;
DWORD
state
=
0
;
if
(
This
->
dsbuffer
)
{
hr
=
IDirectSoundBuffer_GetStatus
(
This
->
dsbuffer
,
&
state
);
if
(
SUCCEEDED
(
hr
))
{
if
(
state
&
DSBSTATUS_PLAYING
)
hr
=
IDirectSoundBuffer_Stop
(
This
->
dsbuffer
);
}
}
if
(
SUCCEEDED
(
hr
))
{
This
->
started
=
FALSE
;
This
->
state
=
State_Stopped
;
}
}
LeaveCriticalSection
(
&
This
->
csFilter
);
...
...
@@ -468,7 +474,21 @@ static HRESULT WINAPI DSoundRender_Pause(IBaseFilter * iface)
EnterCriticalSection
(
&
This
->
csFilter
);
{
This
->
state
=
State_Paused
;
DWORD
state
=
0
;
if
(
This
->
dsbuffer
)
{
hr
=
IDirectSoundBuffer_GetStatus
(
This
->
dsbuffer
,
&
state
);
if
(
SUCCEEDED
(
hr
))
{
if
(
state
&
DSBSTATUS_PLAYING
)
hr
=
IDirectSoundBuffer_Stop
(
This
->
dsbuffer
);
}
}
if
(
SUCCEEDED
(
hr
))
{
This
->
started
=
FALSE
;
This
->
state
=
State_Paused
;
}
}
LeaveCriticalSection
(
&
This
->
csFilter
);
...
...
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