🐞 Duplicate sounds: Fix data race

This fixes a data race by deleting the sound exactly when it finishes
playing.

Previously, a data race could happen in
`CleanupFinishedDuplicateSounds`, where the sound would be destroyed
while Aulib was reading from its buffer.
This commit is contained in:
Gleb Mazovetskiy 2021-05-02 13:49:58 +01:00
commit 559229dea1
5 changed files with 22 additions and 14 deletions

View file

@ -1295,7 +1295,6 @@ void sound_update()
}
stream_update();
CleanupFinishedDuplicateSounds();
}
void effects_cleanup_sfx()