mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Audio Speed Hack (fill pcm buffer)
Dead or alive will be better to using this hack, but some other games will be too fast. So, it's optional.
This commit is contained in:
parent
976c9bbfdc
commit
d5c1d58506
@ -148,6 +148,9 @@ public:
|
||||
int iSFXVolume;
|
||||
int iBGMVolume;
|
||||
|
||||
// Audio Hack
|
||||
bool bSoundSpeedHack;
|
||||
|
||||
// UI
|
||||
bool bShowDebuggerOnLoad;
|
||||
int iShowFPSCounter;
|
||||
|
@ -15,6 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/HLE/FunctionWrappers.h"
|
||||
#include "Core/HW/SimpleAudioDec.h"
|
||||
#include "Core/HW/MediaEngine.h"
|
||||
@ -309,7 +310,7 @@ u32 AuCtx::AuDecode(u32 pcmAddr)
|
||||
inbuff += writePos;
|
||||
|
||||
// decode frames in AuBuf and output into PCMBuf if it is not exceed
|
||||
if (AuBufAvailable > 0 && outpcmbufsize < PCMBufSize){
|
||||
while (AuBufAvailable > 0 && outpcmbufsize < PCMBufSize){
|
||||
int pcmframesize;
|
||||
// decode
|
||||
decoder->Decode(inbuff, AuBufAvailable, outbuf, &pcmframesize);
|
||||
@ -320,6 +321,7 @@ u32 AuCtx::AuDecode(u32 pcmAddr)
|
||||
readPos -= AuBufAvailable;
|
||||
}
|
||||
AuBufAvailable = 0;
|
||||
break;
|
||||
}
|
||||
// count total output pcm size
|
||||
outpcmbufsize += pcmframesize;
|
||||
@ -334,6 +336,10 @@ u32 AuCtx::AuDecode(u32 pcmAddr)
|
||||
writePos += srcPos;
|
||||
// move outbuff position to the current end of output
|
||||
outbuf += pcmframesize;
|
||||
// audio hack, default we will not do while and break here
|
||||
if (!g_Config.bSoundSpeedHack){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Memory::Write_U32(PCMBuf, pcmAddr);
|
||||
|
@ -248,6 +248,9 @@ void GameSettingsScreen::CreateViews() {
|
||||
CheckBox *lowAudio = audioSettings->Add(new CheckBox(&g_Config.bLowLatencyAudio, a->T("Low latency audio")));
|
||||
lowAudio->SetEnabledPtr(&g_Config.bEnableSound);
|
||||
|
||||
audioSettings->Add(new ItemHeader(ms->T("Audio hacks")));
|
||||
audioSettings->Add(new CheckBox(&g_Config.bSoundSpeedHack, a->T("Sound speed hack (fill pcm buffer)")));
|
||||
|
||||
// Control
|
||||
ViewGroup *controlsSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
LinearLayout *controlsSettings = new LinearLayout(ORIENT_VERTICAL);
|
||||
|
Loading…
Reference in New Issue
Block a user