1

EDIT: Sorry for the question being reworded, but I am just simplifying the issue. I am not getting accurate values for SoundChannel.position for an external MP3 that is playing. I've tried a variety of audio bitrates and consistently, i am getting a SoundChannel.position that is less (~250 ms) then where the actual audio has played to. As well, the position never equals the duration. It always finishes behind, even when the SOUND_COMPLETE event is generated.

Adobe says any Sound position/duration issues are fixed with the latest Flash Player. I am obviously not getting the same results. I need very accurate position values in order to have a custom draggable timeline and cue points. Is there some alternative method I should try? I'm not sure what to do. Thanks.

Keith
  • 11
  • 2

1 Answers1

1

try to use a TimerEvent.TIMER instead of ENTER_FRAME as here : real interval between frames is almost never 1000 / fps

www0z0k
  • 4,444
  • 3
  • 27
  • 32
  • Thank you, but that doesn't solve what appears to be incorrect information I am getting directly from the SoundChannel class. – Keith Jun 09 '11 at 14:30
  • @Keith - did you try to call `getTimer()` - http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/package.html#getTimer%28%29 - to compare its step to one of the `SoundChannel.position`? does the mp3 sound correctly? BTW it'd be great to see some code) – www0z0k Jun 09 '11 at 18:03
  • I can actually confirm now that the `SoundChannel.position` is approximately 250-300 ms behind whenever I trace it out (regardless if I use enter_frame or timerevent). I had a loop that stops the sound when position is => 1000, and the sound always audibly plays to around 1.25 seconds. This is even worse, because I could care less if the end 'jumps' when the position while playing is NEVER accurate - I have cue points I need to fire at specific times, and if the position doesn't match the sound that's playing, there are gonna be issues. – Keith Jun 09 '11 at 18:57