From 1332805bb6c1ee892827f563f33fec851e038a18 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Fri, 22 Aug 2014 18:18:37 -0700 Subject: Add headers required by XAudio2_7 to externals. This makes all builds' audio compatible with downlevel Windows and removes the need for developers to install the June 2010 DirectX SDK. --- Source/Core/AudioCommon/XAudio2_7Stream.cpp | 46 +++-------------------------- 1 file changed, 4 insertions(+), 42 deletions(-) (limited to 'Source/Core/AudioCommon/XAudio2_7Stream.cpp') diff --git a/Source/Core/AudioCommon/XAudio2_7Stream.cpp b/Source/Core/AudioCommon/XAudio2_7Stream.cpp index 8739e919f5..cce45d7942 100644 --- a/Source/Core/AudioCommon/XAudio2_7Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2_7Stream.cpp @@ -2,28 +2,15 @@ // Licensed under GPLv2 // Refer to the license.txt file included. -// Note that this file *and this file only* must also have %DXSDK_DIR%/Include prepended -// to its include path in order fetch dxsdkver.h and XAudio2.h from the DXSDK -// instead of other possible places. This may be accomplished by adding the path to -// the AdditionalIncludeDirectories for this file via msbuild. +// Note that this file *and this file only* must include XAudio2.h from the old +// DXSDK instead of other possible places. + +#include #include "AudioCommon/AudioCommon.h" #include "AudioCommon/XAudio2_7Stream.h" #include "Common/Event.h" -#ifdef HAVE_DXSDK -#include -#if (_DXSDK_PRODUCT_MAJOR == 9) && (_DXSDK_PRODUCT_MINOR == 29) && (_DXSDK_BUILD_MAJOR == 1962) && (_DXSDK_BUILD_MINOR == 0) -#define HAVE_DXSDK_JUNE_2010 -#else -#pragma message("You have DirectX SDK installed, but it is not the expected version (June 2010). Update it to build this module.") -#endif -#endif - -#ifdef HAVE_DXSDK_JUNE_2010 - -#include - struct StreamingVoiceContext2_7 : public IXAudio2VoiceCallback { private: @@ -260,28 +247,3 @@ void XAudio2_7::Stop() m_xaudio2_dll = nullptr; } } - -#else - -struct StreamingVoiceContext2_7 {}; -struct IXAudio2 {}; -struct IXAudio2MasteringVoice {}; -void XAudio2_7::ReleaseIXAudio2(IXAudio2* ptr) {} - -XAudio2_7::XAudio2_7(CMixer *mixer) - : SoundStream(mixer) - , m_mastering_voice(nullptr) - , m_volume(1.0f) - , m_cleanup_com(false) -{} - -XAudio2_7::~XAudio2_7() {} - -bool XAudio2_7::Start() { return SoundStream::Start(); } -void XAudio2_7::Stop() {} -void XAudio2_7::Update() {} -void XAudio2_7::Clear(bool mute) {} -void XAudio2_7::SetVolume(int volume) {} -bool XAudio2_7::InitLibrary() { return false; } - -#endif -- cgit v1.2.3