mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Move DSP settings to dolphin.ini
This commit is contained in:
@ -27,6 +27,10 @@
|
||||
#include "OpenALStream.h"
|
||||
#include "PulseAudioStream.h"
|
||||
#include "../../Core/Src/Movie.h"
|
||||
#include "../../Core/Src/ConfigManager.h"
|
||||
|
||||
// This shouldn't be a global, at least not here.
|
||||
SoundStream *soundStream;
|
||||
|
||||
namespace AudioCommon
|
||||
{
|
||||
@ -34,7 +38,7 @@ namespace AudioCommon
|
||||
{
|
||||
// TODO: possible memleak with mixer
|
||||
|
||||
std::string backend = ac_Config.sBackend;
|
||||
std::string backend = SConfig::GetInstance().sBackend;
|
||||
if (backend == BACKEND_OPENAL && OpenALStream::isValid())
|
||||
soundStream = new OpenALStream(mixer);
|
||||
else if (backend == BACKEND_NULLSOUND && NullSound::isValid())
|
||||
@ -54,10 +58,10 @@ namespace AudioCommon
|
||||
|
||||
if (soundStream != NULL)
|
||||
{
|
||||
ac_Config.Update();
|
||||
UpdateSoundStream();
|
||||
if (soundStream->Start())
|
||||
{
|
||||
if (ac_Config.m_DumpAudio)
|
||||
if (SConfig::GetInstance().m_DumpAudio)
|
||||
{
|
||||
std::string audio_file_name = File::GetUserPath(D_DUMPAUDIO_IDX) + "audiodump.wav";
|
||||
File::CreateFullPath(audio_file_name);
|
||||
@ -82,7 +86,7 @@ namespace AudioCommon
|
||||
if (soundStream)
|
||||
{
|
||||
soundStream->Stop();
|
||||
if (ac_Config.m_DumpAudio)
|
||||
if (SConfig::GetInstance().m_DumpAudio)
|
||||
soundStream->GetMixer()->StopLogAudio();
|
||||
//soundStream->StopLogAudio();
|
||||
delete soundStream;
|
||||
@ -122,7 +126,7 @@ namespace AudioCommon
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return ac_Config.m_EnableJIT;
|
||||
return SConfig::GetInstance().m_EnableJIT;
|
||||
}
|
||||
|
||||
void PauseAndLock(bool doLock, bool unpauseOnUnlock)
|
||||
@ -143,4 +147,12 @@ namespace AudioCommon
|
||||
}
|
||||
}
|
||||
}
|
||||
void UpdateSoundStream()
|
||||
{
|
||||
if (soundStream)
|
||||
{
|
||||
soundStream->GetMixer()->SetThrottle(SConfig::GetInstance().m_Framelimit == 2);
|
||||
soundStream->SetVolume(SConfig::GetInstance().m_Volume);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user