Search Issue Tracker
By Design
Votes
0
Found in
2021.3.3f1
2022.1.3f1
2022.2.0a13
Issue ID
UUM-365
Regression
No
Audio playing/stopping delay when the stream parameter in the AudioClip.Create is set to true
How to reproduce:
1. Open the attached '1312535.zip' project
2. Open 'SampleScene'
3. Enter the Play mode
4. Press the 'Stream start' button
5. Press the 'Stream stop' button
Expected result: There is no delay when playing/stopping the audio
Actual result: There is a noticeable delay when playing/stopping the audio
Reproducible with: 2018.4.32f1, 2019.4.21f1, 2020.2.6f1, 2021.1.0b8, 2021.2.0a6
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
- Windows player with a custom .exe file crashes in FixupD3D12SDKPath
- "Property exceeds previous array size (2 vs 1)" warnings are thrown making it impossible to work with the Update Zones of the CustomRenderTexture when updating the script
- Bug Reporter recommends invalid discussion links when writing a Title of the issue
- Freeze when calling Rigidbody.SweepTestAll in a specific project
- Crash on UI::RectTransform::SetDrivenByObject when rapidly undoing copies of a specific GameObject
Resolution Note:
Using streamed audio clips for doing real-time DSP that react to game events is not the right way to go about this. The streaming system has been designed to stream compressed files from memory and uses a large buffer (16384 samples) for storing streams, hence the delay. The proper way to do what the user wants to do is to use OnAudioFilterRead [https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnAudioFilterRead.html].