mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
quartz: Start DirectSound renderer as soon as possible.
Makes directsound switch to silent playback even when no buffers are playing, fixes glitching on starting playback from a stopped buffer.
This commit is contained in:
parent
cf085af126
commit
64b14c0ecd
@ -457,6 +457,19 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv)
|
||||
ERR("Cannot create Direct Sound object (%x)\n", hr);
|
||||
else
|
||||
hr = IDirectSound_SetCooperativeLevel(pDSoundRender->dsound, GetDesktopWindow(), DSSCL_PRIORITY);
|
||||
if (SUCCEEDED(hr)) {
|
||||
IDirectSoundBuffer *buf;
|
||||
DSBUFFERDESC buf_desc;
|
||||
memset(&buf_desc,0,sizeof(DSBUFFERDESC));
|
||||
buf_desc.dwSize = sizeof(DSBUFFERDESC);
|
||||
buf_desc.dwFlags = DSBCAPS_PRIMARYBUFFER;
|
||||
hr = IDirectSound_CreateSoundBuffer(pDSoundRender->dsound, &buf_desc, &buf, NULL);
|
||||
if (SUCCEEDED(hr)) {
|
||||
IDirectSoundBuffer_Play(buf, 0, 0, DSBPLAY_LOOPING);
|
||||
IUnknown_Release(buf);
|
||||
}
|
||||
hr = S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
|
Loading…
Reference in New Issue
Block a user