Search Issue Tracker
By Design
By Design in 2023.2.X
Votes
0
Found in
2021.3.28f1
2022.3.5f1
2023.1.5f1
2023.2.0a22
Issue ID
UUM-43137
Regression
No
Wrong audioClip.length is returned when loading a clip with UnityWebRequestMultimedia.GetAudioClip
Reproduction steps:
1. Open the attached project "UnityAudioClipMp3WrongDuration"
2. Enter Play mode
Expected result: "audioClip.length: 4 seconds, expected length: 4 seconds" is logged in the Console
Actual result: "audioClip.length: 8.202 seconds, expected length: 4 seconds" and "audioClip.length is not as expected." are logged in the Console
Reproducible with: 2021.3.28f1, 2022.3.5f1, 2023.1.5f1, 2023.2.0a22
Reproducible on: macOS 13.4.1 (Intel), Windows 11
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
- Player crash when switching focus in Exclusive Fullscreen mode with DirectX 12
- Too little validation messages in the "WebAssembly Language Features" Memory settings
- Project Settings Search Highlights are misaligned when using the Bitmap Text Rendering Mode
- "GetControlID at event ValidateCommand returns a controlID different from the one in Layout event" Warning is thrown when undoing the deletion of Sprite Shape Profile
- Memory related fields in the "WebAssembly Language Features" can be set to the negative numbers
Resolution Note:
Currently the length estimation of mp3 files is done only with one frame, internally we have seen that this is not accurate enough so have extended this analysis window. This greatly improves the accuracy of the reported length, for example it brings the length estimate in the repro project down to 4.153 seconds. This fix will be released in 2023.2.
There will always be a slight amount of uncertainty with mp3 files, this is by design as using the whole file and measuring every frame is relatively intensive. If you need exact length we suggest you swap format, ogg would be good for this use case.
Resolution Note (2023.2.X):
Currently the length estimation of mp3 files is done only with one frame, internally we have seen that this is not accurate enough so have extended this analysis window. This greatly improves the accuracy of the reported length, for example it brings the length estimate in the repro project down to 4.153 seconds. This fix will be released in 2023.2.
There will always be a slight amount of uncertainty with mp3 files, this is by design as using the whole file and measuring every frame is relatively intensive. If you need exact length we suggest you swap format, ogg would be good for this use case.