- Home /
mp3 22050 Hz plays twice as long
I imported an mp3 sound file into the Project View. If I double click it MS Media Player plays it fine 33 seconds. If I click the play button in the Inspector View/Preview section the audio plays for 66 (01:06:00) seconds. The ending 33 seconds is just silent sound. It should play for 33 seconds.
The sample rate is 22050 Hz.
Maybe this is a bug and the length is being calculated wrong.
I got the sound at:
Answer by _Petroz · Jan 03, 2011 at 10:35 PM
I have reproduced that behaviour in the FMOD PlaySound example. Generally this would indicate a problem with the encoding of the file. I opened the file in Audacity and reencoded it and it worked properly for me after that.
Yeah, Unity, for some strange reason, imports $$anonymous$$P3s with a huge gap at the end.
Your answer
![](https://koobas.hobune.stream/wayback/20220613093911im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Press Button for Sound 1 Answer
Converting .wav to .mp3 0 Answers
.mp3 Copy from the assets to persistentDataPath 1 Answer
2D Animation with multiple sample rates/frame lengths 0 Answers