dmime: Ensure IDirectMusicPort is initialised when calling IDirectMusicPerformance::PChannelInfo.
This commit is contained in:
parent
203272eafa
commit
5b27cdf93b
|
@ -588,7 +588,16 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_AssignPChannel (LPDIRECTMUSIC
|
|||
|
||||
static HRESULT WINAPI IDirectMusicPerformance8Impl_PChannelInfo (LPDIRECTMUSICPERFORMANCE8 iface, DWORD dwPChannel, IDirectMusicPort** ppPort, DWORD* pdwGroup, DWORD* pdwMChannel) {
|
||||
IDirectMusicPerformance8Impl *This = (IDirectMusicPerformance8Impl *)iface;
|
||||
DMUS_PORTPARAMS8 dmusportparams;
|
||||
GUID def;
|
||||
|
||||
FIXME("(%p, %d, %p, %p, %p): stub\n", This, dwPChannel, ppPort, pdwGroup, pdwMChannel);
|
||||
|
||||
dmusportparams.dwSize = sizeof(DMUS_PORTPARAMS8);
|
||||
dmusportparams.dwValidParams = 0;
|
||||
IDirectMusic8_GetDefaultPort(This->pDirectMusic, &def);
|
||||
IDirectMusic8_CreatePort(This->pDirectMusic, &def, &dmusportparams, ppPort, NULL);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ static void test_PChannelInfo(void)
|
|||
pDirectMusicPort = NULL;
|
||||
hr = IDirectMusicPerformance8_PChannelInfo(idmusicperformance, 0, &pDirectMusicPort, NULL, NULL);
|
||||
ok(hr == S_OK, "Failed to call PChannelInfo (%x)\n", hr);
|
||||
todo_wine ok(pDirectMusicPort != NULL, "IDirectMusicPort not set\n");
|
||||
ok(pDirectMusicPort != NULL, "IDirectMusicPort not set\n");
|
||||
if (hr == S_OK && pDirectMusicPort != NULL)
|
||||
IDirectMusicPort_Release(pDirectMusicPort);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue