Sas: Minor clenaup.

This commit is contained in:
Unknown W. Brackets committed 2021-02-06 18:37:05 -08:00
1 parent b52c432f06
commit c99de6409d
2 files changed
+1 -5

No files matched your search

+1 -2
View File
@@ -109,10 +109,9 @@ int __SasThread() {
if (sasThreadState == SasThreadState::QUEUED) {
sas->Mix(sasThreadParams.outAddr, sasThreadParams.inAddr, sasThreadParams.leftVol, sasThreadParams.rightVol);
sasDoneMutex.lock();
std::lock_guard<std::mutex> doneGuard(sasDoneMutex);
sasThreadState = SasThreadState::READY;
sasDone.notify_one();
sasDoneMutex.unlock();
}
}
return 0;
-3
View File
@@ -565,13 +565,10 @@ void SasInstance::MixVoice(SasVoice &voice) {
}
void SasInstance::Mix(u32 outAddr, u32 inAddr, int leftVol, int rightVol) {
int voicesPlayingCount = 0;
for (int v = 0; v < PSP_SAS_VOICES_MAX; v++) {
SasVoice &voice = voices[v];
if (!voice.playing || voice.paused)
continue;
voicesPlayingCount++;
MixVoice(voice);
}