Lock the audio buffer lock when reading released buffers

This is required to prevent races in Puyo Puyo Tetris and potentially
other games.
This commit is contained in:
Billy Laws 2020-07-05 13:55:02 +01:00 committed by ◱ PixelyIon
parent 6329537a9e
commit eadc016525

View File

@ -32,6 +32,7 @@ namespace skyline::audio {
std::vector<u64> AudioTrack::GetReleasedBuffers(u32 max) {
std::vector<u64> bufferIds;
std::unique_lock trackGuard(bufferLock);
for (u32 index = 0; index < max; index++) {
if (!identifiers.back().released)