mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Overhaul the sound fix. It was rooted deeper than I thought. This should cover all complaints now(except pressing escape which discards any settings changed: is this by design? :\). Also add new menu option to Win32 UI under Emulation to control whether Atrac 3 should be on/off.
This commit is contained in:
parent
75f03b4d8a
commit
0ead143013
@ -335,6 +335,14 @@ UI::EventReturn GameSettingsScreen::OnBack(UI::EventParams &e) {
|
||||
if(PSP_IsInited() && !IsAudioInitialised())
|
||||
Audio_Init();
|
||||
}
|
||||
// It doesn't matter if audio is inited or not, it'll still output no sound
|
||||
// if the mixer isn't available, so go ahead and init/shutdown at our leisure.
|
||||
if(Atrac3plus_Decoder::IsInstalled()) {
|
||||
if(g_Config.bEnableAtrac3plus)
|
||||
Atrac3plus_Decoder::Init();
|
||||
else Atrac3plus_Decoder::Shutdown();
|
||||
}
|
||||
|
||||
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ private:
|
||||
UI::EventReturn OnDownloadPlugin(UI::EventParams &e);
|
||||
UI::EventReturn OnControlMapping(UI::EventParams &e);
|
||||
UI::EventReturn OnBack(UI::EventParams &e);
|
||||
|
||||
|
||||
// Temporaries to convert bools to int settings
|
||||
bool cap60FPS_;
|
||||
};
|
||||
|
@ -861,14 +861,19 @@ void AudioScreen::render() {
|
||||
int columnw = 400;
|
||||
UICheckBox(GEN_ID, x, y += stride, a->T("Enable Sound"), ALIGN_TOPLEFT, &g_Config.bEnableSound);
|
||||
if (g_Config.bEnableSound) {
|
||||
if (Atrac3plus_Decoder::IsInstalled()) {
|
||||
UICheckBox(GEN_ID, x, y += stride, a->T("Enable Atrac3+"), ALIGN_TOPLEFT, &g_Config.bEnableAtrac3plus);
|
||||
}
|
||||
|
||||
|
||||
if(PSP_IsInited() && !IsAudioInitialised()) {
|
||||
Audio_Init();
|
||||
}
|
||||
|
||||
if (Atrac3plus_Decoder::IsInstalled()) {
|
||||
UICheckBox(GEN_ID, x, y += stride, a->T("Enable Atrac3+"), ALIGN_TOPLEFT, &g_Config.bEnableAtrac3plus);
|
||||
|
||||
if(g_Config.bEnableAtrac3plus)
|
||||
Atrac3plus_Decoder::Init();
|
||||
else Atrac3plus_Decoder::Shutdown();
|
||||
}
|
||||
|
||||
// Show the download button even if not installed - might want to upgrade.
|
||||
VLinear vlinear(30, 400, 20);
|
||||
std::string atracString;
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "Core/SaveState.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/HW/atrac3plus.h"
|
||||
#include "Windows/EmuThread.h"
|
||||
|
||||
#include "resource.h"
|
||||
@ -1029,6 +1030,23 @@ namespace MainWindow
|
||||
|
||||
case ID_EMULATION_SOUND:
|
||||
g_Config.bEnableSound = !g_Config.bEnableSound;
|
||||
if(!g_Config.bEnableSound) {
|
||||
EnableMenuItem(menu, ID_EMULATION_ATRAC3_SOUND, MF_GRAYED);
|
||||
if(!IsAudioInitialised())
|
||||
Audio_Init();
|
||||
}
|
||||
else
|
||||
EnableMenuItem(menu, ID_EMULATION_ATRAC3_SOUND, MF_ENABLED);
|
||||
break;
|
||||
|
||||
case ID_EMULATION_ATRAC3_SOUND:
|
||||
g_Config.bEnableAtrac3plus = !g_Config.bEnableAtrac3plus;
|
||||
|
||||
if(Atrac3plus_Decoder::IsInstalled()) {
|
||||
if(g_Config.bEnableAtrac3plus)
|
||||
Atrac3plus_Decoder::Init();
|
||||
else Atrac3plus_Decoder::Shutdown();
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_HELP_OPENWEBSITE:
|
||||
@ -1217,6 +1235,7 @@ namespace MainWindow
|
||||
CHECKITEM(ID_OPTIONS_TOPMOST, g_Config.bTopMost);
|
||||
CHECKITEM(ID_EMULATION_SOUND, g_Config.bEnableSound);
|
||||
CHECKITEM(ID_TEXTURESCALING_DEPOSTERIZE, g_Config.bTexDeposterize);
|
||||
CHECKITEM(ID_EMULATION_ATRAC3_SOUND, g_Config.bEnableAtrac3plus);
|
||||
|
||||
static const int zoomitems[4] = {
|
||||
ID_OPTIONS_SCREEN1X,
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user