// .h file snippet:
Microsoft::WRL::ComPtr<IXAudio2> pIXAudio2;
HRESULT hrXAudio2Create;
//
IXAudio2MasteringVoice **pMasteringVoice;
HRESULT hrXAudio2MasteringVoiceCreate;
//
// .cpp file snippet:
// returns S_OK
hrXAudio2Create = XAudio2Create(&pIXAudio2,
0,
XAUDIO2_DEFAULT_PROCESSOR);
//
// returns 0x88960001
hrXAudio2MasteringVoiceCreate = pIXAudio2->CreateMasteringVoice(pMasteringVoice,
8, //XAUDIO2_DEFAULT_CHANNELS,
XAUDIO2_DEFAULT_SAMPLERATE,
0,
NULL,
NULL,
AudioCategory_Other);
I am trying to create an XAudio2 graph in a universal app. I am testing on the Windows Phone project first.
My attempt at trying to use the CreateMasteringVoice() method returns a 0x88960001 XAUDIO2_E_INVALID_CALL error message.
I can't figure out how to get this to return an S_OK.
Any help would be greatly appreciated.