Unsupported sampling rate (0Hz)

Unable to transcode song.mp3
Unsupported sampling rate (0Hz)

Code

[Embed(source='assets/MuffinManSwing.mp3')]
private var snd_class:Class;

Cause
The mp3 is in an unsupported format and the Flex compiler does not have the ability to encode it into one. Note: The Flash IDE compiler can import and convert an mp3 into a supported format.

Quote,
“Flash can import either 8- or 16-bit sounds at sample rates of 11, 22, or 44 kHz. Sounds recorded in formats that are not multiples of 11 kHz (such as 8, 32, or 96 kHz) are resampled when imported into Flash. Flash can convert sounds to lower sample rates on export.”
Source

Flash SWF files only allow four sample rates for embedded mp3′s:
5500 Hz
11025 Hz
22050 Hz
44100 Hz (preferred setting)

Solution
Convert the MP3 to a supported sample rate.

Draft: Possible solution is to set the embed mime type to octet stream like so:

[Embed(source='assets/MuffinManSwing.mp3',mimeType="application/octet-stream")]
private var snd_class:Class;
private var snd:Sound = new snd_class() as Sound;

About Judah

Please note in the comments if this has helped you or not.
This entry was posted in Compiler. Bookmark the permalink.

3 Responses to Unsupported sampling rate (0Hz)

  1. RiaanP says:

    Hi there.

    The MIME-type addition seems to work. My Flash file compiles when I use it.

  2. RiaanP says:

    One more comment from me. I used Audacity to resample my MP3s as it was a freebie to download.. thus I was not exactly sure how to resample.

    It turns out that there’s two resample settings. The important one in this scenario is at the bottom left of the screen (PC) called Project Rate. You should change that before exporting your MP3.

Leave a Reply

Your email address will not be published. Required fields are marked *

Highlight your code before posting code:

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="">