Saturday, October 19, 2013

How to solve "unsupported sampling/frequency" of audio files in AS3 (Starling Framework)?

As mentioned in the previous post, it is pretty straightforward to load audio/sound files in Starling Framework. But the thing is, it is annoying to learn that the adobe Flash Builder only allows to import the audio files that are recorded in the multiple of 11kHz (11kHz, 22kHz, 44kHz). And if it is not, you will get the error similar to the message below:

- Internal error in outgoing dependency subsystem, when generating code for ... : java.lang.NullPointerException
- The frequency 0 is not supported in file....

So, how to solve this "unsupported sampling/frequency" issue? (we are not sound engineers right?)

Solution: Manually down-sample/up-sample the audio/sound files

At the moment, I suggest using a third-party audio editor software, such as GoldWave to manually edit the sampling rate of your audio/sound files. (I personally hope that someone would make a browser-based version of that functionality)

To use the GoldWave, you could simply open your audio/sound files with it, and "Save as" a file in the "mp3" format, choosing any option which is in the multiple of the 11kHz frequency. (Here, i pick Layer-3 (LAME), 44100 Hz, 128kpbs, stereo.)

Once you have saved it, you can re-embed your audio/sound files again. :)

No comments:

Post a Comment