Enable xaudio error logging.

This commit is contained in:
Ben Vanik 2014-01-13 00:01:51 -08:00
parent 4f552da6c4
commit ae5b87ea2a
1 changed files with 9 additions and 0 deletions

View File

@ -40,6 +40,15 @@ void XAudio2AudioSystem::Initialize() {
return;
}
XAUDIO2_DEBUG_CONFIGURATION config;
config.TraceMask = XAUDIO2_LOG_ERRORS;
config.BreakMask = 0;
config.LogThreadID = FALSE;
config.LogTiming = TRUE;
config.LogFunctionName = TRUE;
config.LogFileline = TRUE;
audio_->SetDebugConfiguration(&config);
hr = audio_->CreateMasteringVoice(&mastering_voice_);
if (FAILED(hr)) {
XELOGE("CreateMasteringVoice failed with %.8X", hr);