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"

WebGL

-

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

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

Comments (3)

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

  2. chrisMary

    Jan 07, 2022 05:59

    I have the same problem

  3. oxovira

    Aug 10, 2021 12:32

    Same problem

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.