🐞 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:
parent
58b805cf47
commit
559229dea1
5 changed files with 22 additions and 14 deletions
|
|
@ -1295,7 +1295,6 @@ void sound_update()
|
|||
}
|
||||
|
||||
stream_update();
|
||||
CleanupFinishedDuplicateSounds();
|
||||
}
|
||||
|
||||
void effects_cleanup_sfx()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue