Regarding Submix voices and filter parameters try the following:
int main(array<System::String ^> ^args)
{
HRESULT hr = 0;
IXAudio2* pIXAudio = NULL;
IXAudio2MasteringVoice* pIMasterVoice = NULL;
IXAudio2SubmixVoice* pISubmix = NULL;
UINT32 Flags = 0;
#ifdef _DEBUG
Flags = XAUDIO2_DEBUG_ENGINE;
#endif
// Create XAudio2 object
hr = XAudio2Create(&pIXAudio, Flags);
if(FAILED(hr))
return -1;
// Create XAudio2 Mastering Voice
hr = pIXAudio->CreateMasteringVoice(&pIMasterVoice);
if(FAILED(hr))
{
// Give up and exit
pIXAudio->Release();
return -1;
}
// Create XAudio2 Submix Voice
hr = pIXAudio->CreateSubmixVoice(&pISubmix, 2, 44100);
if(FAILED(hr))
{
// Destroy Mastering voice
pIMasterVoice->DestroyVoice();
// Free XAudio2 object
pIXAudio->Release();
}
XAUDIO2_FILTER_PARAMETERS xfp;
xfp.Frequency = 0.2f;
xfp.OneOverQ = 0.1f;
xfp.Type = BandPassFilter;
pISubmix->SetFilterParameters(&xfp);
// clean up
pISubmix->DestroyVoice();
pIMasterVoice->DestroyVoice();
pIXAudio->Release();
return 0;
}
As soon as the SetFilterParameters method is called the following debug info is generated:
XAUDIO2:
Thread 320: 3331.162ms: CX2Voice::SetFilterParameters: Acquiring
m_ApiLock at 0x01121FCC created by CX2Engine::InitializeLocks...
XAUDIO2:
Thread 320: 3331.354ms: CX2Voice::SetFilterParameters: Acquired
m_ApiLock at 0x01121FCC created by CX2Engine::InitializeLocks
XAUDIO2: Thread 320: 3336.649ms: x2voicebase.cpp:1082: IXAudio2Voice::SetFilterParameters: API call: Entry (this=0x011304F4)
XAUDIO2:
Thread 320: 3336.853ms: x2voicebase.cpp:1088:
CX2Voice::SetFilterParameters: ERROR: Filter control is not available
on this voice
Now the documentation with the DirectX March 2008 SDK and indeed
http://msdn2.microsoft.com/en-us/library/bb669181(VS.85).aspx states that submix voices support the SetFilterParameters method but
http://msdn2.microsoft.com/en-us/library/bb694519(VS.85).aspx does not list SetFilterParameters as a method.
Does anyone else recieve this information or are their requests successful?
Thanks
:)