From 0a4dc1f88381f64c42f417b6dacfcb13971821b1 Mon Sep 17 00:00:00 2001 From: LunaMoo Date: Sat, 24 Mar 2018 16:21:34 +0100 Subject: [PATCH 1/3] Remove "sound speed hack". --- Core/Config.cpp | 1 - Core/Config.h | 3 --- Core/HW/SimpleAudioDec.cpp | 12 +++--------- UI/GameSettingsScreen.cpp | 3 --- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index f1805dab3b..25355866f0 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -673,7 +673,6 @@ static ConfigSetting soundSettings[] = { ConfigSetting("AudioBackend", &g_Config.iAudioBackend, 0, true, true), ConfigSetting("AudioLatency", &g_Config.iAudioLatency, 1, true, true), ConfigSetting("ExtraAudioBuffering", &g_Config.bExtraAudioBuffering, false, true, false), - ConfigSetting("SoundSpeedHack", &g_Config.bSoundSpeedHack, false, true, true), ConfigSetting("AudioResampler", &g_Config.bAudioResampler, true, true, true), ConfigSetting("GlobalVolume", &g_Config.iGlobalVolume, VOLUME_MAX, true, true), diff --git a/Core/Config.h b/Core/Config.h index a45080ff0e..06f92f6618 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -201,9 +201,6 @@ public: int iGlobalVolume; bool bExtraAudioBuffering; // For bluetooth - // Audio Hack - bool bSoundSpeedHack; - // UI bool bShowDebuggerOnLoad; int iShowFPSCounter; diff --git a/Core/HW/SimpleAudioDec.cpp b/Core/HW/SimpleAudioDec.cpp index 05d36541f8..f9ccbbe745 100644 --- a/Core/HW/SimpleAudioDec.cpp +++ b/Core/HW/SimpleAudioDec.cpp @@ -330,15 +330,8 @@ u32 AuCtx::AuDecode(u32 pcmAddr) memset(outbuf, 0, PCMBufSize); // important! empty outbuf to avoid noise u32 outpcmbufsize = 0; - int repeat = 1; - if (g_Config.bSoundSpeedHack){ - repeat = 2; - } - int i = 0; - // decode frames in sourcebuff and output into PCMBuf (each time, we decode one or two frames) - // some games as Miku like one frame each time, some games like DOA like two frames each time - while (sourcebuff.size() > 0 && outpcmbufsize < PCMBufSize && i < repeat){ - i++; + // decode frames in sourcebuff and output into PCMBuf, making sure it's filled + while (sourcebuff.size() > 0 && outpcmbufsize < PCMBufSize) { int pcmframesize; // decode decoder->Decode((void*)sourcebuff.c_str(), (int)sourcebuff.size(), outbuf, &pcmframesize); @@ -367,6 +360,7 @@ u32 AuCtx::AuDecode(u32 pcmAddr) outbuf += pcmframesize; // increase FrameNum count FrameNum++; + break; } Memory::Write_U32(PCMBuf, pcmAddr); return outpcmbufsize; diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index cb1c80fdc1..063b2b7434 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -514,9 +514,6 @@ void GameSettingsScreen::CreateViews() { resampling->SetEnabledPtr(&g_Config.bEnableSound); } - audioSettings->Add(new ItemHeader(a->T("Audio hacks"))); - audioSettings->Add(new CheckBox(&g_Config.bSoundSpeedHack, a->T("Sound speed hack (DOA etc.)"))); - // Control ViewGroup *controlsSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); controlsSettingsScroll->SetTag("GameSettingsControls"); From 751ddf6fa2c92786ce8dbe881f0a0fa858742596 Mon Sep 17 00:00:00 2001 From: LunaMoo Date: Thu, 25 Apr 2019 04:17:54 +0200 Subject: [PATCH 2/3] Hopefully fix the annoying LR. --- libretro/libretro.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index a267c8a225..7b0f2bb493 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -185,7 +185,6 @@ static RetroOption ppsspp_gpu_hardware_transform("ppsspp_gpu_hardware_tran static RetroOption ppsspp_vertex_cache("ppsspp_vertex_cache", "Vertex Cache (Speedhack)", true); static RetroOption ppsspp_separate_io_thread("ppsspp_separate_io_thread", "IO Threading", false); static RetroOption ppsspp_unsafe_func_replacements("ppsspp_unsafe_func_replacements", "Unsafe FuncReplacements", true); -static RetroOption ppsspp_sound_speedhack("ppsspp_sound_speedhack", "Sound Speedhack", false); static RetroOption ppsspp_cheats("ppsspp_cheats", "Internal Cheats Support", false); static RetroOption ppsspp_io_timing_method("ppsspp_io_timing_method", "IO Timing Method", { { "Fast", IOTimingMethods::IOTIMING_FAST }, { "Host", IOTimingMethods::IOTIMING_HOST }, { "Simulate UMD delays", IOTimingMethods::IOTIMING_REALISTIC } }); @@ -213,7 +212,6 @@ void retro_set_environment(retro_environment_t cb) { vars.push_back(ppsspp_vertex_cache.GetOptions()); vars.push_back(ppsspp_separate_io_thread.GetOptions()); vars.push_back(ppsspp_unsafe_func_replacements.GetOptions()); - vars.push_back(ppsspp_sound_speedhack.GetOptions()); vars.push_back(ppsspp_cheats.GetOptions()); vars.push_back(ppsspp_io_timing_method.GetOptions()); vars.push_back({}); @@ -278,7 +276,6 @@ static void check_variables(CoreParameter &coreParam) { ppsspp_texture_replacement.Update(&g_Config.bReplaceTextures); ppsspp_separate_io_thread.Update(&g_Config.bSeparateIOThread); ppsspp_unsafe_func_replacements.Update(&g_Config.bFuncReplacements); - ppsspp_sound_speedhack.Update(&g_Config.bSoundSpeedHack); ppsspp_cheats.Update(&g_Config.bEnableCheats); ppsspp_locked_cpu_speed.Update(&g_Config.iLockedCPUSpeed); ppsspp_rendering_mode.Update(&g_Config.iRenderingMode); From 53daa0d844afa57a75686fd44ba64c83cae0ba53 Mon Sep 17 00:00:00 2001 From: LunaMoo Date: Sun, 28 Apr 2019 13:02:57 +0200 Subject: [PATCH 3/3] Remove some unused code. --- Core/Config.h | 1 - UI/NativeApp.cpp | 2 -- UI/SavedataScreen.cpp | 2 -- 3 files changed, 5 deletions(-) diff --git a/Core/Config.h b/Core/Config.h index 06f92f6618..689acb51ff 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -81,7 +81,6 @@ public: bool bPauseExitsEmulator; #endif bool bPauseMenuExitsEmulator; - bool bPS3Controller; // Core bool bIgnoreBadMemAccess; diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 38e94664e6..b6e6634852 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -551,8 +551,6 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch fileToLog = argv[i] + strlen("--log="); if (!strncmp(argv[i], "--state=", strlen("--state=")) && strlen(argv[i]) > strlen("--state=")) stateToLoad = argv[i] + strlen("--state="); - if (!strncmp(argv[1], "--PS3", strlen("--PS3"))) - g_Config.bPS3Controller = true; #if !defined(MOBILE_DEVICE) if (!strncmp(argv[i], "--escape-exit", strlen("--escape-exit"))) g_Config.bPauseExitsEmulator = true; diff --git a/UI/SavedataScreen.cpp b/UI/SavedataScreen.cpp index 735b57d5ed..6d5fcf65cf 100644 --- a/UI/SavedataScreen.cpp +++ b/UI/SavedataScreen.cpp @@ -339,8 +339,6 @@ bool SavedataBrowser::ByFilename(const UI::View *v1, const UI::View *v2) { static time_t GetTotalSize(const SavedataButton *b) { auto fileLoader = std::unique_ptr(ConstructFileLoader(b->GamePath())); - tm datetm; - bool success; switch (Identify_File(fileLoader.get())) { case IdentifiedFileType::PSP_PBP_DIRECTORY: case IdentifiedFileType::PSP_SAVEDATA_DIRECTORY: