Search Issue Tracker
Won't Fix
Votes
1
Found in
2018.3.0a1
2018.3.0f2
2019.1.0a1
Issue ID
1113325
Regression
No
[WebGL] "Data too long to fit the audioclip: . X sample(s) discarded" on "audioClip.setData"
Reproduction steps:
1. Open "megalon.zip" project and download "2018_12_27_14_05_26_654.json"
2. Build and Run project for WebGL
3. Drag "2018_12_27_14_05_26_654.json" into the appropriate area
4. "Play"
5. Access the Developers Console
6. Notice an error: "Data too long to fit the audioclip: . 27495 sample(s) discarded"
Expected Result: No errors appear
Actual Result: Error appears every time the audio clip is player
Reproduced with: 2019.2.0a1, 2019.4.18f1, 2018.3.3f1, 2017.4.18f1
-
Der-Kleine
Oct 19, 2023 10:35
I may have found a solution to the problem: When you call AudioClip.Create, multiply the lengthSamples with the sample rate of the file you're creating from divided by 44100.
so instead of setting
lengthSamples = someValue
set
lengthSamples = (int)(someValue * (audioFile.sampleRate / 44100f))
-
chrisMary
Jan 07, 2022 05:59
I have the same problem
-
oxovira
Aug 10, 2021 12:32
Same problem
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
- Crash on ShaderLab::ShaderState::ApplyShaderState when entering Play Mode and calling ShaderWarmup.WarmupShaderFromCollection with a shader that has dynamic_branch
- Crash on operator delete[] when a serializable structure in the System namespace is serialized by a MonoBehaviour
- [macOS] forward and backward mouse buttons are recognized as middle mouse button
- NavMeshModifier.OnEnable/OnDisable gets progressively slower when called repeatedly
- "System.Net.CookieContainer" throws an "ArgumentException" error when using a non-UTF-8 machine locale and hostname
Resolution Note (2019.2.X):
Desktop Team Management has evaluated this issue and determined that it does not meet our current bug severity threshold. If you would like your issue to be reviewed again, please re-submit your bug