Disable auto-loading the directshow filter by default as it's unstable. Add new INI setting [Sound] AutoLoadDShow to turn it back on.

This commit is contained in:
Henrik Rydgard 2013-05-25 16:58:00 +02:00
parent b128ebd554
commit 2ef4a05a49
3 changed files with 10 additions and 3 deletions

View File

@ -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);

View File

@ -83,6 +83,7 @@ public:
// Sound
bool bEnableSound;
bool bAutoLoadDShow;
// UI
bool bShowTouchControls;

View File

@ -1,6 +1,8 @@
#ifdef _USE_DSHOW_
#include "audioPlayer.h"
#include "Core/Config.h"
#include <dshow.h>
#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);
}