mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 18:53:58 +01:00
Sas: Minor clenaup.
This commit is contained in:
1 parent
b52c432f06
commit
c99de6409d
2 files changed
+1
-5
No files matched your search
+1
-2
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user