Actionscript 3.0 SoundChannel Position Pause Bug

as3I spent my entire morning today trying to discover why I couldn’t get a pause function to work properly on an actionscript 3.0 mp3 player. I came to find out that a very significant bug exists in actionscript that keeps channel.position (part of SoundChannel) from reporting the correct position location of a stopped mp3. A few bloggers also talk about similar problems, and I list one link below.

The Problem

This is the heart of the problem: channel.position mis-reports the actual position of the audio for mp3 files less than 128kbps.

Files larger than 128kbps seem to work fine. It has also been suggested that in order for channel.position to work correctly, the mp3 audio must also sampled at 44.100kHz. It is also reported that Adobe has been notified of this bug.What surprised me the most about his endeavor is Adobe’s over-sight with their SoundChannel. Not only is it, reportedly, loaded with bugs, but it also lacks basic functions. While we have a play() and stop(), for example, we aren’t given a pause().

I originally found information about this problem at http://www.stevensacks.net/2008/08/07/bug-with-sound-channel-position-and-mp3s-less-than-128kbps/.

The Solution

Until Adobe fixes this problem, re-sample your audio greater than 128kbps.


Comments

  1. Matt Perkins said on November 6, 2009

    This issue has been around for a long time. Found it in Feb 08 with Flash Player 9 and doesn’t look like Adobe fix it with version 10. Really annoying – my files are under 128kbps because I have strict file size limits – just have to live with glitchy player.

Add Your Comment