xaudio2: Implement IXAudio28MasteringVoice::GetChannelMask.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Andrew Eikum 2015-10-19 09:24:46 -05:00 committed by Alexandre Julliard
parent 3f55d106fa
commit 3b9e089c63
2 changed files with 10 additions and 0 deletions

View File

@ -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;

View File

@ -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 = {