From 2ef4a05a497ca25d5a0eef6b63ca36c8375f3180 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sat, 25 May 2013 16:58:00 +0200 Subject: [PATCH] Disable auto-loading the directshow filter by default as it's unstable. Add new INI setting [Sound] AutoLoadDShow to turn it back on. --- Core/Config.cpp | 2 ++ Core/Config.h | 1 + Core/HW/audioPlayer.cpp | 10 +++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 0cc73bcbc2..6275bdce62 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -126,6 +126,7 @@ void Config::Load(const char *iniFileName) IniFile::Section *sound = iniFile.GetOrCreateSection("Sound"); sound->Get("Enable", &bEnableSound, true); + sound->Get("AutoLoadDShow", &bAutoLoadDShow, false); IniFile::Section *control = iniFile.GetOrCreateSection("Control"); control->Get("ShowStick", &bShowAnalogStick, false); @@ -215,6 +216,7 @@ void Config::Save() IniFile::Section *sound = iniFile.GetOrCreateSection("Sound"); sound->Set("Enable", bEnableSound); + sound->Set("AutoLoadDShow", bAutoLoadDShow); IniFile::Section *control = iniFile.GetOrCreateSection("Control"); control->Set("ShowStick", bShowAnalogStick); diff --git a/Core/Config.h b/Core/Config.h index 090f058a9a..9370d8d882 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -83,6 +83,7 @@ public: // Sound bool bEnableSound; + bool bAutoLoadDShow; // UI bool bShowTouchControls; diff --git a/Core/HW/audioPlayer.cpp b/Core/HW/audioPlayer.cpp index fc07dfb16d..3d6aefdfdd 100644 --- a/Core/HW/audioPlayer.cpp +++ b/Core/HW/audioPlayer.cpp @@ -1,6 +1,8 @@ #ifdef _USE_DSHOW_ #include "audioPlayer.h" +#include "Core/Config.h" + #include #include "qeditsimple.h" #pragma comment(lib, "Strmiids.lib") @@ -568,9 +570,11 @@ void deleteAtrac3Audio(int atracID) void initaudioEngine() { - if (LoadFilterLibrary(0, "filter\\lib\\AsyncStreamflt.ax") != S_OK) - { - WARN_LOG(HLE, "Can't load AsyncStreamflt.ax"); + if (g_Config.bAutoLoadDShow) { + if (LoadFilterLibrary(0, "filter\\lib\\AsyncStreamflt.ax") != S_OK) + { + WARN_LOG(HLE, "Can't load AsyncStreamflt.ax"); + } } CoInitialize(0); }