mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 02:03:47 +01:00
Merge pull request #10783 from LunaMoo/fillSoundBuffer
Remove "sound speed hack"
This commit is contained in:
7 files changed
+3
-24
No files matched your search
@@ -323,15 +323,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);
|
||||
@@ -360,6 +353,7 @@ u32 AuCtx::AuDecode(u32 pcmAddr)
|
||||
outbuf += pcmframesize;
|
||||
// increase FrameNum count
|
||||
FrameNum++;
|
||||
break;
|
||||
}
|
||||
Memory::Write_U32(PCMBuf, pcmAddr);
|
||||
return outpcmbufsize;
|
||||
|
||||
Reference in new issue
Block a user