dmime: Don't try to create a standard audio path if the client didn't ask for one.
This commit is contained in:
parent
b09d195bf3
commit
629e857c2e
|
@ -945,6 +945,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_InitAudio(IDirectMusicPerform
|
|||
This->pParams.dwFeatures = dwFlags;
|
||||
This->pParams.clsidDefaultSynth = CLSID_DirectMusicSynthSink;
|
||||
}
|
||||
if(dwDefaultPathType != 0)
|
||||
hr = IDirectMusicPerformance8_CreateStandardAudioPath(iface, dwDefaultPathType, dwPChannelCount, FALSE, &This->pDefaultPath);
|
||||
|
||||
PostMessageToProcessMsgThread(This, PROCESSMSG_START);
|
||||
|
@ -1096,7 +1097,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire
|
|||
|
||||
*ppNewPath = pPath;
|
||||
|
||||
TRACE(" returning IDirectMusicPerformance interface at %p.\n", *ppNewPath);
|
||||
TRACE(" returning IDirectMusicAudioPath interface at %p.\n", *ppNewPath);
|
||||
|
||||
return IDirectMusicAudioPath_Activate(*ppNewPath, fActivate);
|
||||
}
|
||||
|
|
|
@ -82,6 +82,20 @@ static HRESULT test_InitAudio(void)
|
|||
|
||||
IDirectMusicPerformance8_Release(idmusicperformance);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_DirectMusicPerformance, NULL,
|
||||
CLSCTX_INPROC_SERVER, &IID_IDirectMusicPerformance8,
|
||||
(void**)&idmusicperformance);
|
||||
ok(hr == S_OK, "CoCreateInstance failed: %08x\n", hr);
|
||||
|
||||
hr = IDirectMusicPerformance8_InitAudio(idmusicperformance, NULL, NULL,
|
||||
NULL, 0, 64, 0, NULL);
|
||||
ok(hr == S_OK, "InitAudio failed: %08x\n", hr);
|
||||
|
||||
hr = IDirectMusicPerformance8_CloseDown(idmusicperformance);
|
||||
ok(hr == S_OK, "CloseDown failed: %08x\n", hr);
|
||||
|
||||
IDirectMusicPerformance8_Release(idmusicperformance);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue