mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
sceSas : should be always delay thread
This commit is contained in:
parent
536fcbd719
commit
3f20b5ad77
3 changed files with 4 additions and 26 deletions
|
@ -131,15 +131,7 @@ u32 _sceSasCore(u32 core, u32 outAddr) {
|
|||
|
||||
bool ret = sas->Mix(outAddr);
|
||||
// Actual delay time seems to between 240 and 1000 us, based on grain and possibly other factors.
|
||||
// When there's no voicesPlayingCount , we return as no delay and fixes issue #2304.
|
||||
// Note that Mix() returns true in this case when no voicesPlayingCount.
|
||||
if (ret) {
|
||||
// If voicesPlayingCount == 0 , no delay
|
||||
return 0;
|
||||
} else {
|
||||
// if voicesPlayingCount > 0 , delay 240 us and reschedule
|
||||
return hleDelayResult(0, "sas core", 240);
|
||||
}
|
||||
}
|
||||
|
||||
// Another way of running the mixer, the inoutAddr should be both input and output
|
||||
|
@ -152,15 +144,7 @@ u32 _sceSasCoreWithMix(u32 core, u32 inoutAddr, int leftVolume, int rightVolume)
|
|||
|
||||
bool ret = sas->Mix(inoutAddr, inoutAddr, leftVolume, rightVolume);
|
||||
// Actual delay time seems to between 240 and 1000 us, based on grain and possibly other factors.
|
||||
// When there's no voicesPlayingCount , we return as no delay and fixes issue #2304.
|
||||
// Note that Mix() returns true in this case when no voicesPlayingCount.
|
||||
if (ret) {
|
||||
// If voicesPlayingCount == 0 , no delay
|
||||
return 0;
|
||||
} else {
|
||||
// if voicesPlayingCount > 0 , delay 240 us and reschedule
|
||||
return hleDelayResult(0, "sas core", 240);
|
||||
}
|
||||
}
|
||||
|
||||
u32 sceSasSetVoice(u32 core, int voiceNum, u32 vagAddr, int size, int loop) {
|
||||
|
|
|
@ -471,7 +471,7 @@ void SasInstance::MixVoice(SasVoice &voice) {
|
|||
}
|
||||
}
|
||||
|
||||
bool SasInstance::Mix(u32 outAddr, u32 inAddr, int leftVol, int rightVol) {
|
||||
void SasInstance::Mix(u32 outAddr, u32 inAddr, int leftVol, int rightVol) {
|
||||
int voicesPlayingCount = 0;
|
||||
|
||||
for (int v = 0; v < PSP_SAS_VOICES_MAX; v++) {
|
||||
|
@ -519,12 +519,6 @@ bool SasInstance::Mix(u32 outAddr, u32 inAddr, int leftVol, int rightVol) {
|
|||
#ifdef AUDIO_TO_FILE
|
||||
fwrite(Memory::GetPointer(outAddr), 1, grainSize * 2 * 2, audioDump);
|
||||
#endif
|
||||
|
||||
if (voicesPlayingCount == 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void SasInstance::ApplyReverb() {
|
||||
|
|
|
@ -276,7 +276,7 @@ public:
|
|||
|
||||
FILE *audioDump;
|
||||
|
||||
bool Mix(u32 outAddr, u32 inAddr = 0, int leftVol = 0, int rightVol = 0);
|
||||
void Mix(u32 outAddr, u32 inAddr = 0, int leftVol = 0, int rightVol = 0);
|
||||
void MixVoice(SasVoice &voice);
|
||||
|
||||
// Applies reverb to send buffer, according to waveformEffect.
|
||||
|
|
Loading…
Add table
Reference in a new issue