From: Andrew Eikum Subject: [PATCH 1/2] xaudio2: Implement IXAudio28MasteringVoice::GetChannelMask Message-Id: <20151019142446.GI9736@foghorn.codeweavers.com> Date: Mon, 19 Oct 2015 09:24:46 -0500 Signed-off-by: Andrew Eikum --- dlls/xaudio2_7/tests/xaudio2.c | 7 +++++++ dlls/xaudio2_7/xaudio_dll.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/dlls/xaudio2_7/tests/xaudio2.c b/dlls/xaudio2_7/tests/xaudio2.c index 716fe23..23da38b 100644 --- a/dlls/xaudio2_7/tests/xaudio2.c +++ b/dlls/xaudio2_7/tests/xaudio2.c @@ -174,6 +174,7 @@ static void test_simple_streaming(IXAudio2 *xa) XAUDIO2_VOICE_STATE state; XAUDIO2_EFFECT_DESCRIPTOR effect; XAUDIO2_EFFECT_CHAIN chain; + DWORD chmask; memset(&ecb_state, 0, sizeof(ecb_state)); memset(&src1_state, 0, sizeof(src1_state)); @@ -196,6 +197,12 @@ static void test_simple_streaming(IXAudio2 *xa) hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects); ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr); + if(!xaudio27){ + chmask = 0xdeadbeef; + IXAudio2MasteringVoice_GetChannelMask(master, &chmask); + ok(chmask == (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT), "Got unexpected channel mask: 0x%x\n", chmask); + } + /* create first source voice */ fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT; fmt.nChannels = 2; diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index 76d9503..818c0e2 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -966,7 +966,10 @@ static void WINAPI XA2M_GetChannelMask(IXAudio2MasteringVoice *iface, DWORD *pChannelMask) { IXAudio2Impl *This = impl_from_IXAudio2MasteringVoice(iface); + TRACE("%p %p\n", This, pChannelMask); + + *pChannelMask = This->fmt.dwChannelMask; } static const struct IXAudio2MasteringVoiceVtbl XAudio2MasteringVoice_Vtbl = { -- 2.6.1