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
- [Linux] Package Manager window disappears when adding a package from git URL
- Duplicating an array element in Inspector when there's a scrollbar makes an invisible item at the bottom
- Text in the Profiler events disappears before the event reaches the bottom of the window when changing the height of the Module details pane
- The Text Field of the parameters of the “Layout Element” Component disappears when inserting the “NaN” text
- Mesh Collider stops working and throws an error "doesn’t have Read/Write enabled" in the Development Console when in the Player
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.