xaudio2: Don't return XAudio28 interface for XAudio2[0..7] objects in QueryInterface().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43660 Signed-off-by: Roger Zoellner <zoellner.roger@gmail.com> Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b02cdd3615
commit
a303f9cd10
|
@ -1273,6 +1273,9 @@ START_TEST(xaudio2)
|
||||||
if(hr == S_OK){
|
if(hr == S_OK){
|
||||||
xaudio27 = TRUE;
|
xaudio27 = TRUE;
|
||||||
|
|
||||||
|
hr = IXAudio27_QueryInterface(xa27, &IID_IXAudio28, (void**) &xa);
|
||||||
|
ok(hr != S_OK, "QueryInterface with IID_IXAudio28 on IXAudio27 object returned success. Expected to fail\n");
|
||||||
|
|
||||||
hr = IXAudio27_Initialize(xa27, 0, XAUDIO2_ANY_PROCESSOR);
|
hr = IXAudio27_Initialize(xa27, 0, XAUDIO2_ANY_PROCESSOR);
|
||||||
ok(hr == S_OK, "Initialize failed: %08x\n", hr);
|
ok(hr == S_OK, "Initialize failed: %08x\n", hr);
|
||||||
|
|
||||||
|
|
|
@ -1262,7 +1262,9 @@ static HRESULT WINAPI IXAudio2Impl_QueryInterface(IXAudio2 *iface, REFIID riid,
|
||||||
TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObject);
|
TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObject);
|
||||||
|
|
||||||
if(IsEqualGUID(riid, &IID_IUnknown) ||
|
if(IsEqualGUID(riid, &IID_IUnknown) ||
|
||||||
|
#if XAUDIO2_VER == 8
|
||||||
IsEqualGUID(riid, &IID_IXAudio28) ||
|
IsEqualGUID(riid, &IID_IXAudio28) ||
|
||||||
|
#endif
|
||||||
IsEqualGUID(riid, &IID_IXAudio2))
|
IsEqualGUID(riid, &IID_IXAudio2))
|
||||||
*ppvObject = &This->IXAudio2_iface;
|
*ppvObject = &This->IXAudio2_iface;
|
||||||
else if(IsEqualGUID(riid, &IID_IXAudio27)){
|
else if(IsEqualGUID(riid, &IID_IXAudio27)){
|
||||||
|
|
Loading…
Reference in New Issue