From 34692ab826abc8f8faa61bdb2280b742424528f1 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 7 Dec 2013 15:14:29 -0500 Subject: Remove unnecessary Src/ folders --- Source/Core/AudioCommon/XAudio2Stream.cpp | 261 ++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 Source/Core/AudioCommon/XAudio2Stream.cpp (limited to 'Source/Core/AudioCommon/XAudio2Stream.cpp') diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp new file mode 100644 index 0000000000..8c8a2253d0 --- /dev/null +++ b/Source/Core/AudioCommon/XAudio2Stream.cpp @@ -0,0 +1,261 @@ +// Copyright 2013 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#include +#include "AudioCommon.h" +#include "XAudio2Stream.h" + +#ifndef XAUDIO2_DLL +#error You are building this module against the wrong version of DirectX. You probably need to remove DXSDK_DIR from your include path. +#endif + +struct StreamingVoiceContext : public IXAudio2VoiceCallback +{ +private: + CMixer* const m_mixer; + Common::Event& m_sound_sync_event; + IXAudio2SourceVoice* m_source_voice; + std::unique_ptr xaudio_buffer; + + void SubmitBuffer(PBYTE buf_data); + +public: + StreamingVoiceContext(IXAudio2 *pXAudio2, CMixer *pMixer, Common::Event& pSyncEvent); + + ~StreamingVoiceContext(); + + void StreamingVoiceContext::Stop(); + void StreamingVoiceContext::Play(); + + STDMETHOD_(void, OnVoiceError) (THIS_ void* pBufferContext, HRESULT Error) {} + STDMETHOD_(void, OnVoiceProcessingPassStart) (UINT32) {} + STDMETHOD_(void, OnVoiceProcessingPassEnd) () {} + STDMETHOD_(void, OnBufferStart) (void*) {} + STDMETHOD_(void, OnLoopEnd) (void*) {} + STDMETHOD_(void, OnStreamEnd) () {} + + STDMETHOD_(void, OnBufferEnd) (void* context); +}; + +const int NUM_BUFFERS = 3; +const int SAMPLES_PER_BUFFER = 96; + +const int NUM_CHANNELS = 2; +const int BUFFER_SIZE = SAMPLES_PER_BUFFER * NUM_CHANNELS; +const int BUFFER_SIZE_BYTES = BUFFER_SIZE * sizeof(s16); + +void StreamingVoiceContext::SubmitBuffer(PBYTE buf_data) +{ + XAUDIO2_BUFFER buf = {}; + buf.AudioBytes = BUFFER_SIZE_BYTES; + buf.pContext = buf_data; + buf.pAudioData = buf_data; + + m_source_voice->SubmitSourceBuffer(&buf); +} + +StreamingVoiceContext::StreamingVoiceContext(IXAudio2 *pXAudio2, CMixer *pMixer, Common::Event& pSyncEvent) + : m_mixer(pMixer) + , m_sound_sync_event(pSyncEvent) + , xaudio_buffer(new BYTE[NUM_BUFFERS * BUFFER_SIZE_BYTES]()) +{ + WAVEFORMATEXTENSIBLE wfx = {}; + + wfx.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; + wfx.Format.nSamplesPerSec = m_mixer->GetSampleRate(); + wfx.Format.nChannels = 2; + wfx.Format.wBitsPerSample = 16; + wfx.Format.nBlockAlign = wfx.Format.nChannels*wfx.Format.wBitsPerSample / 8; + wfx.Format.nAvgBytesPerSec = wfx.Format.nSamplesPerSec * wfx.Format.nBlockAlign; + wfx.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX); + wfx.Samples.wValidBitsPerSample = 16; + wfx.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; + wfx.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; + + // create source voice + HRESULT hr; + if (FAILED(hr = pXAudio2->CreateSourceVoice(&m_source_voice, &wfx.Format, XAUDIO2_VOICE_NOSRC, 1.0f, this))) + { + PanicAlertT("XAudio2 CreateSourceVoice failed: %#X", hr); + return; + } + + m_source_voice->Start(); + + // start buffers with silence + for (int i = 0; i != NUM_BUFFERS; ++i) + SubmitBuffer(xaudio_buffer.get() + (i * BUFFER_SIZE_BYTES)); +} + +StreamingVoiceContext::~StreamingVoiceContext() +{ + if (m_source_voice) + { + m_source_voice->Stop(); + m_source_voice->DestroyVoice(); + } +} + +void StreamingVoiceContext::Stop() +{ + if (m_source_voice) + m_source_voice->Stop(); +} + +void StreamingVoiceContext::Play() +{ + if (m_source_voice) + m_source_voice->Start(); +} + +void StreamingVoiceContext::OnBufferEnd(void* context) +{ + // buffer end callback; gets SAMPLES_PER_BUFFER samples for a new buffer + + if (!m_source_voice || !context) + return; + + //m_sound_sync_event->Wait(); // sync + //m_sound_sync_event->Spin(); // or tight sync + + m_mixer->Mix(static_cast(context), SAMPLES_PER_BUFFER); + SubmitBuffer(static_cast(context)); +} + +HMODULE XAudio2::m_xaudio2_dll = nullptr; +typedef decltype(&XAudio2Create) XAudio2Create_t; +void *XAudio2::PXAudio2Create = nullptr; + +bool XAudio2::InitLibrary() +{ + if (m_xaudio2_dll) + { + return true; + } + + m_xaudio2_dll = ::LoadLibrary(XAUDIO2_DLL); + if (!m_xaudio2_dll) + { + return false; + } + + if (!PXAudio2Create) + { + PXAudio2Create = (XAudio2Create_t)::GetProcAddress(m_xaudio2_dll, "XAudio2Create"); + if (!PXAudio2Create) + { + ::FreeLibrary(m_xaudio2_dll); + m_xaudio2_dll = nullptr; + return false; + } + } + + return true; +} + +XAudio2::XAudio2(CMixer *mixer) + : SoundStream(mixer) + , m_mastering_voice(nullptr) + , m_volume(1.0f) + , m_cleanup_com(SUCCEEDED(CoInitializeEx(NULL, COINIT_MULTITHREADED))) +{ +} + +XAudio2::~XAudio2() +{ + Stop(); + if (m_cleanup_com) + CoUninitialize(); +} + +bool XAudio2::Start() +{ + HRESULT hr; + + // callback doesn't seem to run on a specific cpu anyways + IXAudio2* xaudptr; + if (FAILED(hr = ((XAudio2Create_t)PXAudio2Create)(&xaudptr, 0, XAUDIO2_DEFAULT_PROCESSOR))) + { + PanicAlertT("XAudio2 init failed: %#X", hr); + Stop(); + return false; + } + m_xaudio2 = std::unique_ptr(xaudptr); + + // XAudio2 master voice + // XAUDIO2_DEFAULT_CHANNELS instead of 2 for expansion? + if (FAILED(hr = m_xaudio2->CreateMasteringVoice(&m_mastering_voice, 2, m_mixer->GetSampleRate()))) + { + PanicAlertT("XAudio2 master voice creation failed: %#X", hr); + Stop(); + return false; + } + + // Volume + m_mastering_voice->SetVolume(m_volume); + + m_voice_context = std::unique_ptr + (new StreamingVoiceContext(m_xaudio2.get(), m_mixer, m_sound_sync_event)); + + return true; +} + +void XAudio2::SetVolume(int volume) +{ + //linear 1- .01 + m_volume = (float)volume / 100.f; + + if (m_mastering_voice) + m_mastering_voice->SetVolume(m_volume); +} + +void XAudio2::Update() +{ + //m_sound_sync_event.Set(); + + //static int xi = 0; + //if (100000 == ++xi) + //{ + // xi = 0; + // XAUDIO2_PERFORMANCE_DATA perfData; + // pXAudio2->GetPerformanceData(&perfData); + // NOTICE_LOG(DSPHLE, "XAudio2 latency (samples): %i", perfData.CurrentLatencyInSamples); + // NOTICE_LOG(DSPHLE, "XAudio2 total glitches: %i", perfData.GlitchesSinceEngineStarted); + //} +} + +void XAudio2::Clear(bool mute) +{ + m_muted = mute; + + if (m_voice_context) + { + if (m_muted) + m_voice_context->Stop(); + else + m_voice_context->Play(); + } +} + +void XAudio2::Stop() +{ + //m_sound_sync_event.Set(); + + m_voice_context.reset(); + + if (m_mastering_voice) + { + m_mastering_voice->DestroyVoice(); + m_mastering_voice = nullptr; + } + + m_xaudio2.reset(); // release interface + + if (m_xaudio2_dll) + { + ::FreeLibrary(m_xaudio2_dll); + m_xaudio2_dll = nullptr; + PXAudio2Create = nullptr; + } +} -- cgit v1.2.3 From 6c4ee1753aa2b9e620138801b479365b0569317c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 16 Feb 2014 15:30:18 -0500 Subject: Fix some vertical alignments ie. uses spaces for alignment. --- Source/Core/AudioCommon/XAudio2Stream.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Source/Core/AudioCommon/XAudio2Stream.cpp') diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp index 8c8a2253d0..cbc860bda3 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2Stream.cpp @@ -62,16 +62,16 @@ StreamingVoiceContext::StreamingVoiceContext(IXAudio2 *pXAudio2, CMixer *pMixer, { WAVEFORMATEXTENSIBLE wfx = {}; - wfx.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; - wfx.Format.nSamplesPerSec = m_mixer->GetSampleRate(); - wfx.Format.nChannels = 2; - wfx.Format.wBitsPerSample = 16; - wfx.Format.nBlockAlign = wfx.Format.nChannels*wfx.Format.wBitsPerSample / 8; - wfx.Format.nAvgBytesPerSec = wfx.Format.nSamplesPerSec * wfx.Format.nBlockAlign; - wfx.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX); + wfx.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; + wfx.Format.nSamplesPerSec = m_mixer->GetSampleRate(); + wfx.Format.nChannels = 2; + wfx.Format.wBitsPerSample = 16; + wfx.Format.nBlockAlign = wfx.Format.nChannels*wfx.Format.wBitsPerSample / 8; + wfx.Format.nAvgBytesPerSec = wfx.Format.nSamplesPerSec * wfx.Format.nBlockAlign; + wfx.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX); wfx.Samples.wValidBitsPerSample = 16; - wfx.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; - wfx.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; + wfx.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; + wfx.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; // create source voice HRESULT hr; @@ -221,7 +221,7 @@ void XAudio2::Update() // XAUDIO2_PERFORMANCE_DATA perfData; // pXAudio2->GetPerformanceData(&perfData); // NOTICE_LOG(DSPHLE, "XAudio2 latency (samples): %i", perfData.CurrentLatencyInSamples); - // NOTICE_LOG(DSPHLE, "XAudio2 total glitches: %i", perfData.GlitchesSinceEngineStarted); + // NOTICE_LOG(DSPHLE, "XAudio2 total glitches: %i", perfData.GlitchesSinceEngineStarted); //} } -- cgit v1.2.3 From 3fd87a7636ff434118a5d7f7334550be8db55c0b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 16 Feb 2014 23:51:41 -0500 Subject: Second and final pass of clearing out tabs. --- Source/Core/AudioCommon/XAudio2Stream.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Source/Core/AudioCommon/XAudio2Stream.cpp') diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp index cbc860bda3..4e9bade618 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2Stream.cpp @@ -217,11 +217,11 @@ void XAudio2::Update() //static int xi = 0; //if (100000 == ++xi) //{ - // xi = 0; - // XAUDIO2_PERFORMANCE_DATA perfData; - // pXAudio2->GetPerformanceData(&perfData); - // NOTICE_LOG(DSPHLE, "XAudio2 latency (samples): %i", perfData.CurrentLatencyInSamples); - // NOTICE_LOG(DSPHLE, "XAudio2 total glitches: %i", perfData.GlitchesSinceEngineStarted); + // xi = 0; + // XAUDIO2_PERFORMANCE_DATA perfData; + // pXAudio2->GetPerformanceData(&perfData); + // NOTICE_LOG(DSPHLE, "XAudio2 latency (samples): %i", perfData.CurrentLatencyInSamples); + // NOTICE_LOG(DSPHLE, "XAudio2 total glitches: %i", perfData.GlitchesSinceEngineStarted); //} } @@ -250,7 +250,7 @@ void XAudio2::Stop() m_mastering_voice = nullptr; } - m_xaudio2.reset(); // release interface + m_xaudio2.reset(); // release interface if (m_xaudio2_dll) { -- cgit v1.2.3 From 2afe2152712981e21d6bda6f029292ed2b1cf91e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 17 Feb 2014 05:18:15 -0500 Subject: Convert all includes to relative paths. --- Source/Core/AudioCommon/XAudio2Stream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/AudioCommon/XAudio2Stream.cpp') diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp index 4e9bade618..117484ca80 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2Stream.cpp @@ -3,8 +3,8 @@ // Refer to the license.txt file included. #include -#include "AudioCommon.h" -#include "XAudio2Stream.h" +#include "AudioCommon/AudioCommon.h" +#include "AudioCommon/XAudio2Stream.h" #ifndef XAUDIO2_DLL #error You are building this module against the wrong version of DirectX. You probably need to remove DXSDK_DIR from your include path. -- cgit v1.2.3 From d802d392811be44d34ae9cd23f616db93e54c50f Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 9 Mar 2014 21:14:26 +0100 Subject: clang-modernize -use-nullptr and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine --- Source/Core/AudioCommon/XAudio2Stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/AudioCommon/XAudio2Stream.cpp') diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp index 117484ca80..d5964f0e0e 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2Stream.cpp @@ -158,7 +158,7 @@ XAudio2::XAudio2(CMixer *mixer) : SoundStream(mixer) , m_mastering_voice(nullptr) , m_volume(1.0f) - , m_cleanup_com(SUCCEEDED(CoInitializeEx(NULL, COINIT_MULTITHREADED))) + , m_cleanup_com(SUCCEEDED(CoInitializeEx(nullptr, COINIT_MULTITHREADED))) { } -- cgit v1.2.3 From 6bdcbad3e4488c85ae402dcb44f65005769c64b9 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Mon, 14 Apr 2014 01:15:23 +0200 Subject: Common: Move the Event class to a separate file, and add tests for it. Fix includes everywhere to match this. --- Source/Core/AudioCommon/XAudio2Stream.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/Core/AudioCommon/XAudio2Stream.cpp') diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp index d5964f0e0e..81af045300 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2Stream.cpp @@ -5,6 +5,7 @@ #include #include "AudioCommon/AudioCommon.h" #include "AudioCommon/XAudio2Stream.h" +#include "Common/Event.h" #ifndef XAUDIO2_DLL #error You are building this module against the wrong version of DirectX. You probably need to remove DXSDK_DIR from your include path. -- cgit v1.2.3 From b25e1a2eb4fd20ba84103549a59ea4c4a8639641 Mon Sep 17 00:00:00 2001 From: Stevoisiak Date: Thu, 13 Nov 2014 21:28:27 -0500 Subject: Various formatting and consistency fixes --- Source/Core/AudioCommon/XAudio2Stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/AudioCommon/XAudio2Stream.cpp') diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp index 81af045300..d0446cb4bb 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2Stream.cpp @@ -174,7 +174,7 @@ bool XAudio2::Start() { HRESULT hr; - // callback doesn't seem to run on a specific cpu anyways + // callback doesn't seem to run on a specific CPU anyways IXAudio2* xaudptr; if (FAILED(hr = ((XAudio2Create_t)PXAudio2Create)(&xaudptr, 0, XAUDIO2_DEFAULT_PROCESSOR))) { -- cgit v1.2.3 From 35ee8a136237042efa6987e954c135f91a065cd0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 24 May 2015 04:13:02 -0400 Subject: SoundStream: Internally construct the mixer Instead of creating the mixer externally and then passing it in, it can just be made within the class. --- Source/Core/AudioCommon/XAudio2Stream.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Source/Core/AudioCommon/XAudio2Stream.cpp') diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp index d0446cb4bb..f0fec703b7 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2Stream.cpp @@ -155,9 +155,8 @@ bool XAudio2::InitLibrary() return true; } -XAudio2::XAudio2(CMixer *mixer) - : SoundStream(mixer) - , m_mastering_voice(nullptr) +XAudio2::XAudio2() + : m_mastering_voice(nullptr) , m_volume(1.0f) , m_cleanup_com(SUCCEEDED(CoInitializeEx(nullptr, COINIT_MULTITHREADED))) { @@ -197,7 +196,7 @@ bool XAudio2::Start() m_mastering_voice->SetVolume(m_volume); m_voice_context = std::unique_ptr - (new StreamingVoiceContext(m_xaudio2.get(), m_mixer, m_sound_sync_event)); + (new StreamingVoiceContext(m_xaudio2.get(), m_mixer.get(), m_sound_sync_event)); return true; } -- cgit v1.2.3 From cefcb0ace9d363b3679b4e93bcc9ec05f1e5f4f8 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Mon, 18 May 2015 01:08:10 +0200 Subject: Update license headers to GPLv2+ --- Source/Core/AudioCommon/XAudio2Stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/AudioCommon/XAudio2Stream.cpp') diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp index f0fec703b7..b712d8e398 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2Stream.cpp @@ -1,5 +1,5 @@ // Copyright 2013 Dolphin Emulator Project -// Licensed under GPLv2 +// Licensed under GPLv2+ // Refer to the license.txt file included. #include -- cgit v1.2.3 From 30ebb2459eb97ba544547183854775df8460b475 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 24 May 2015 06:55:12 +0200 Subject: Set copyright year to when a file was created --- Source/Core/AudioCommon/XAudio2Stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/AudioCommon/XAudio2Stream.cpp') diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp index b712d8e398..76db61e9a8 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2Stream.cpp @@ -1,4 +1,4 @@ -// Copyright 2013 Dolphin Emulator Project +// Copyright 2010 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. -- cgit v1.2.3 From 030d467d62cb1e3e5b40c5ba3fa142626efef9a5 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Thu, 4 Jun 2015 13:23:58 +0200 Subject: Use PanicAlert instead of PanicAlertT when appropriate It means less work for the translators... But I'm not too sure about this, because most of these have already been translated. --- Source/Core/AudioCommon/XAudio2Stream.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/AudioCommon/XAudio2Stream.cpp') diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp index 76db61e9a8..6e8762b4e9 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2Stream.cpp @@ -78,7 +78,7 @@ StreamingVoiceContext::StreamingVoiceContext(IXAudio2 *pXAudio2, CMixer *pMixer, HRESULT hr; if (FAILED(hr = pXAudio2->CreateSourceVoice(&m_source_voice, &wfx.Format, XAUDIO2_VOICE_NOSRC, 1.0f, this))) { - PanicAlertT("XAudio2 CreateSourceVoice failed: %#X", hr); + PanicAlert("XAudio2 CreateSourceVoice failed: %#X", hr); return; } @@ -177,7 +177,7 @@ bool XAudio2::Start() IXAudio2* xaudptr; if (FAILED(hr = ((XAudio2Create_t)PXAudio2Create)(&xaudptr, 0, XAUDIO2_DEFAULT_PROCESSOR))) { - PanicAlertT("XAudio2 init failed: %#X", hr); + PanicAlert("XAudio2 init failed: %#X", hr); Stop(); return false; } @@ -187,7 +187,7 @@ bool XAudio2::Start() // XAUDIO2_DEFAULT_CHANNELS instead of 2 for expansion? if (FAILED(hr = m_xaudio2->CreateMasteringVoice(&m_mastering_voice, 2, m_mixer->GetSampleRate()))) { - PanicAlertT("XAudio2 master voice creation failed: %#X", hr); + PanicAlert("XAudio2 master voice creation failed: %#X", hr); Stop(); return false; } -- cgit v1.2.3