Skip to content

Commit

Permalink
dmime: Set the port direct sound before activating it.
Browse files Browse the repository at this point in the history
  • Loading branch information
rbernon authored and julliard committed Sep 28, 2023
1 parent 3400e41 commit 50b09dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dlls/dmime/performance.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
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);
return hr;
}

for (i = 0; i < params->dwChannelGroups; i++)
pchannel_block_set(&perf->pchannels, i, port, i + 1, FALSE);

Expand Down

0 comments on commit 50b09dc

Please sign in to comment.