Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.2.4f1
Issue ID
1091374
Regression
No
Audio loading with UnityWebRequest returns 0 channels in WebGL
To reproduce:
1) Open attached project and scene (corrected one with scene saved)
2) Play it on Editor
3) Press the button and upload an audio file
Expected: The audio plays and info on samples and channels is returned on screen in labels
4) Build and run on WebGL
5) Press the button and upload an audio file
Actual: The audio plays, but the channels remain at zero even when isReadyToPlay is true
Reproduced in 2017.4.2f2, 2018.2.13f1, 2018.3.0b6
-
doron-matific1
Jan 30, 2023 11:17
The length is mostly important here, and it is returning as 0.
It cannot be calculated just from .samples alone, and the other needed variables are also returned as 0.
How can you think this is not important?
Knowing the length of the audio???
I'll have to go with a specific implementation for WebGL, which will not really fix the issue, just ignore it better. -
BayouSoftware
May 05, 2021 16:11
It's not just channels, length, samples and frequency all return zero and GetData just fails. This has cost me a day finding out this was the cause and trying to find a way around.
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
- NullReferenceException when setting 'isTextObjectScaleStatic' to false on a disabled TextMeshPro GameObject
- Shader Stripping Custom Options disappear when exiting Play mode without reloading Domain
- Decals do not get projected when 'Rendering Layer Mask' on a GameObject is 23rd Layer or above due to encoding/decoding issues
- Deriving from SearchContextAttribute doesn't always work
- Scripting API documentation is missing for macOS editor extensions
Resolution Note (2019.1.X):
AudioClip.samples will return a non-zero value as soon as AudioClip.isReadyToPlay switches to true. Channels returning incorrect value we believe is low impact and not a priority to fix at this point.