Commit 79129db1 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz/dsoundrender: Clear the DirectSound buffer on EOS.

"Zero Escape: Nine Hours, Nine Persons, Nine Doors" does not stop or destroy the graph after it is finished running, so the last second of audio repeats otherwise. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e7075780
......@@ -477,6 +477,8 @@ static HRESULT dsound_render_sink_eos(struct strmbase_sink *iface)
struct dsound_render *filter = impl_from_strmbase_pin(&iface->pin);
IFilterGraph *graph = filter->filter.graph;
IMediaEventSink *event_sink;
void *buffer;
DWORD size;
EnterCriticalSection(&filter->stream_cs);
......@@ -494,6 +496,10 @@ static HRESULT dsound_render_sink_eos(struct strmbase_sink *iface)
DSoundRender_HandleEndOfStream(filter);
IDirectSoundBuffer_Lock(filter->dsbuffer, 0, 0, &buffer, &size, NULL, NULL, DSBLOCK_ENTIREBUFFER);
memset(buffer, 0, size);
IDirectSoundBuffer_Unlock(filter->dsbuffer, buffer, size, NULL, 0);
LeaveCriticalSection(&filter->stream_cs);
return S_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment