Andrew Eikum : xaudio2: Implement IXAudio28MasteringVoice::GetChannelMask.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Oct 19 11:34:21 CDT 2015
Module: wine
Branch: master
Commit: 3b9e089c6352b7c1aae25fb2d7ebe5f6221725f3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3b9e089c6352b7c1aae25fb2d7ebe5f6221725f3
Author: Andrew Eikum <aeikum at codeweavers.com>
Date: Mon Oct 19 09:24:46 2015 -0500
xaudio2: Implement IXAudio28MasteringVoice::GetChannelMask.
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 = {
More information about the wine-cvs
mailing list