Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mp3 plays too fast

Status
Not open for further replies.

brownfox

Programmer
Jan 5, 2003
173
0
0
GB
This code is called from a button on the main time line:
Code:
on(Release){
mySound = new Sound();
mySound.loadSound("track1.mp3",true);
}
but the tune plays ridiculously fast. If I load the mp3 normally into the timeline it plays fine. The sample rate of the mp3 is khz 44.1
Can anyone suggest anything? Is this because I'm using a button to play the file?
 
not saying this the solution but

on(Release){
mySound = new Sound();
mySound.loadSound("track1.mp3",true);
mysound.start();
}

as i hate code attached to clips/buttons as its so untidy

my_button.onRelease = function(){
mySound = new Sound();
mySound.loadSound("track1.mp3",true);
mysound.start();
}
 
Starting a dynamic streaming soundObject is useless and untidy, on the initial download anyways!

If you're sure the khz is really 44, as Flash can only handle mp3s with bit rates in increments of 11 (11, 22, 44, etc...)and at 160kbps, it might be the copyright and original bits that are set in the original track, and you'll then have to re-encode it, with those bits off, for it to play at it's regular speed.
 
Thanks for your responses. I have changed my code to bills' suggestion but no luck. The mp3 properties are 32kbps and 44.1 khz - perhaps the 0.1 extra khz is causing the problem. The samples are legitimate so copyright is not an issue. I don't know what the problem is :(
 
What I meant was that you had to re-encode it and turn off the copyright and original bits, so that Flash can handle it. Can load some other mp3s? And only stuck with this particular one? Then you should try to re-encode.
 
No it's all the samples and there are hundreds of them! I really don't want to have to re-encode them all but...
 
Try with one?

Can't you load any other unrelated mp3?
 
I have found the problem: the mp3 samples have a bitrate of 32K and a frequency (sampling rate) of 16K. Thanks for the feedback though!
 
Though?

My first reply...

...If you're sure the khz is really 44, as Flash can only handle mp3s with bit rates in increments of 11 (11, 22, 44, etc...)and at...

How would 32 be an increment of 11?
 
No that's not the problem as I have resampled the track from 32kbps/16000Hz to 32kbps/44100Hz and it plays fine. But thanks for your suggestion all the same...
 
How do I go to a static html page after my introduction movie runs. Do I just use an action to "get url" or can I end the movie with a static page. Please explain.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top