Commit 629e857c authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

dmime: Don't try to create a standard audio path if the client didn't ask for one.

parent b09d195b
......@@ -945,7 +945,8 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_InitAudio(IDirectMusicPerform
This->pParams.dwFeatures = dwFlags;
This->pParams.clsidDefaultSynth = CLSID_DirectMusicSynthSink;
}
hr = IDirectMusicPerformance8_CreateStandardAudioPath(iface, dwDefaultPathType, dwPChannelCount, FALSE, &This->pDefaultPath);
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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment