Sunday, April 28, 2013

MP3 Sound Files do not always work... at first

One important thing I figured out today about playing sound files... Even though Actionscript plays mp3 files it seems that not all mp3 files are immediately playable when embedding them into an Actionscript file.

In two cases so far I "fixed" the files by first opening them in Adobe Audition sound program then "messing around" with them and re-saving.

(1) in one case I got some sort of error about "Frequency 0 not allowed" when I tried to compile the program. I went in to the mp3 file and ran it through a frequency filter, chopping off the very low end frequency then re-saved the file.

(2) in another case there was some sort of "bad metadata" that the program couldn't read so I saved the file first in .wav format then re-encoded it to .mp3.

I imagine that I might have other problems with mp3 files in the future. One thing to note is that it was extremely difficult to detect the source of the problems at first because the debugger doesn't actually POINT to the problem. In one case the sound just did not play... and in the other case the code just did not compile.

No comments:

Post a Comment