Search Issue Tracker
By Design
Votes
1
Found in
2019.1.0a9
2019.1.0f2
2019.2.0a1
Issue ID
1147478
Regression
Yes
AudioSource.PlayOneShot doesn't play sounds properly when there are a lot of animated sprites in the scene
Steps to repro:
1. Open original project "Sound_Bug_2019.1.zip"
2. Enter PlayMode and listen to the Audio
Expected result: Audio does not stutter.
Actual result: Audio stutters.
Reproduced in: 2019.1.0f2, 2019.2.0a13
Not reproduced in: 2018.3.14f1, 2019.1.0a8
Comments (1)
-
arkogelul
Jun 14, 2019 11:40
Alright, but what I can see is that, over time, Unity becomes less capable of handling things. In previous versions, Unity was able to handle this (I agree) badly design setup just fine.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note (2019.3.X):
This is simply because the large number of game objects causes a long Animators.Update (see Profiler) that ranges from 12-28 ms on a fast computer. Thus frames will be skipped, and there will therefore be less frequent frame updates than the code aims for with it's 20 ms throttling. Both Play and PlayOneShot are equally affected by this, and to make things worse the chosen "Best Performance" setting in the Audio Settings results in the largest DSP buffer used (4x as large as "Best latency"), so that further increases the likeliness of having large gaps between the frame update and the point at which the audio playback event is handled. If you want rock-solid timing of sub-frametime, you need to use PlayScheduled to trigger multiple events to occur during the next frame update, and as an AudioSource can only handle one scheduled playback event at a time, you need to delegate these out to multiple sources (from a pool so they can be reused efficiently).