Search Issue Tracker
Active
Under Consideration for 6000.4.X, 6000.5.X, 6000.6.X
In Progress in 6000.6.X
Votes
0
Found in
6000.4.0a1
6000.5.0a1
6000.6.0a1
Issue ID
UUM-137041
Regression
No
In a Web build AudioClip.loadState can report wrong value for clips recorded with Microphone
Steps to reproduce:
Prerequiste: A microphone or headset needs to be connected to the device.
- Open attached project [^web-microphone-bug.zip] .
- Click on "File > Build Profiles".
- Switch to Web platform.
- Click on "Build & Run".
- In the browser allow to access to the microphone
- Check for errors in browser console
Actual results: An error is logged to the browser console "Can't get data from microphone sound clip because data is not yet decompressed." and data is not loaded.
Expected results: The audio data is loaded and "Got Clips successfully!" is logged to the console.
Reproducible with versions: 6000.4.0b7, 6000.5.0a1, 6000.6.0a1
Not reproducible with versions: None
Can’t test with versions: Versions before 6000.4 do not support the Microphone API on the Web Platform.
Tested on (OS): Windows 11
Notes:
- The main issue is that AudioClip.loadState seems to return a wrong state for a brief moment after Microphone.End(deviceId) is called. It should report Loading immediatly after recording is stopped while the compressed audio data is still decoding. Instead it is reporting Loaded at first before it switches to Loading.
- As a workaround it is possible to wait for a few seconds after calling Microphone.End(deviceId) before querying the loadState.
- Prebuild project [^MicrophoneTest.zip] [^MicrophoneTestWithWorkaround.zip]
- Bug was reported by user on the forums: [https://discussions.unity.com/t/microphone-audio-load-state-issue-in-webgl/1712173/14]
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Add comment