AudioSource.timeSamples are offset when looping a part of audio by subtracting a fixed number of samples in WebGL Player
Unity: Platform Audio
Fixed
6.2.X
6.1.X
6.0.X
2022.3.X
Won't Fix
2021.3.X
Fix the audio context resume/suspend mechanic.
How to reproduce:
1. Open the “AudioTimeSamplesOff.zip“ project
2. Open the “SampleScene“
3. Enter the Play Mode
4. Observe the Audio
5. Build and run the project for WebGL
6. Observe the Audio
Expected result: The music loops seamlessly
Actual result: The music loops at the wrong time
Reproduced on: Windows 11 Pro (23H2)
Not reproduced on: No other environment tested
Notes:
In the Player, the samples start counting straight away, but the music does not start until the Player is interacted with (does not impact the offset, but could be related)
Not reproducible in the Editor or in Windows Standalone Player
Prioritise and Follow this issue
Have a workaround or additional info about this issue?