Search Issue Tracker

By Design

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

  1. 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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.