Description
AudioRandomContainer crashes when pausing an AudioSource shortly after playback begins on slower devices (Switch, Android). The crash occurs in AudioRandomContainerRuntime::CleanUpFinishedClipPlayables()
Inital Setup
Any version with AudioRandomContainer, 2023.2.12f1
Reproduction steps
1. Create an AudioRandomContainer with streaming clips (loadType: Streaming) or a mix of streaming and non-streaming clips
2. Assign the ARC to an AudioSource
3. Call AudioSource.Play()
4. Wait one frame (yield return null)
5. Call AudioSource.Pause()
6. Crash occurs on Switch/Android
Expected behaviour
Pausing an AudioSource with an AudioRandomContainer should work without crashing, regardless of clip load type or device speed.
Actual behavior
Crash in AudioRandomContainerRuntime::CleanUpFinishedClipPlayables()