diff --git a/src/core/audio/hle_core.cpp b/src/core/audio/hle_core.cpp index 1e7b6bfb7..3ab05c93d 100644 --- a/src/core/audio/hle_core.cpp +++ b/src/core/audio/hle_core.cpp @@ -211,11 +211,11 @@ namespace Audio { if (audioEnabled) { // Wait until we've actually got room to push our frame - while (sampleBuffer.size() + 2 > sampleBuffer.Capacity()) { + while (sampleBuffer.size() + frame.size() * 2 > sampleBuffer.Capacity()) { std::this_thread::sleep_for(std::chrono::milliseconds{1}); } - sampleBuffer.push(frame.data(), frame.size()); + sampleBuffer.push(frame.data(), frame.size() * 2); } } @@ -276,6 +276,12 @@ namespace Audio { } } + for (int i = 0; i < Audio::samplesInFrame; i++) { + auto& mix0 = mixes[0]; + auto& sample = mix0[i]; + frame[i] = {s16(sample[0]), s16(sample[2])}; + } + performMix(read, write); }