mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-15 00:27:16 +00:00
dmime: Set the port direct sound before activating it.
This commit is contained in:
parent
3400e41d5c
commit
50b09dcf11
|
@ -651,10 +651,14 @@ static HRESULT perf_dmport_create(struct performance *perf, DMUS_PORTPARAMS *par
|
||||||
|
|
||||||
if (FAILED(hr = IDirectMusic8_CreatePort(perf->dmusic, &guid, params, &port, NULL)))
|
if (FAILED(hr = IDirectMusic8_CreatePort(perf->dmusic, &guid, params, &port, NULL)))
|
||||||
return hr;
|
return hr;
|
||||||
if (FAILED(hr = IDirectMusicPort_Activate(port, TRUE))) {
|
|
||||||
|
if (FAILED(hr = IDirectMusicPort_SetDirectSound(port, perf->dsound, NULL))
|
||||||
|
|| FAILED(hr = IDirectMusicPort_Activate(port, TRUE)))
|
||||||
|
{
|
||||||
IDirectMusicPort_Release(port);
|
IDirectMusicPort_Release(port);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < params->dwChannelGroups; i++)
|
for (i = 0; i < params->dwChannelGroups; i++)
|
||||||
pchannel_block_set(&perf->pchannels, i, port, i + 1, FALSE);
|
pchannel_block_set(&perf->pchannels, i, port, i + 1, FALSE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue