Re: [flexcoders] Problem syncing multiple sound objects playing simultaneously

2008-09-08 Thread Nate Beck
Hey Mat,
There is a whole slew of bugs that started popping up when Adobe made some
changes to how audio is handled.  The problems start around version 9.0.115
on.  That being said... the current version of flash player is still
affected, 9.0.124.  You can track these bugs here:

https://bugs.adobe.com/jira/browse/FP-33
https://bugs.adobe.com/jira/browse/FP-127

Some people have work-arounds posted (you can find them in the above links),
also it seems that Flash Player 10 has fixed this issue as well.  It is
unclear at this moment whether or not they will apply the fix to Flash
Player 9 in an update, or if we just have to wait until Flash Player 10 goes
public.

Cheers,
Nate

On Fri, Sep 5, 2008 at 9:49 PM, Mat Mikul [EMAIL PROTECTED] wrote:

   Hi!

 I have an application which plays 5 sound files together sort of like the
 following:

 var speech:Array = new Array();
 var sc:Array = new Array();
 var speechPath:Array = { x0.mp3, x1.mp3, x2.mp3, x3.mp3, x4.mp3
 };

 public function initApp():void
 {
  for (var i:int = 0; i  5; ++i) {
  speech[i] = new Sound(speechPath[0]);
  }
 }

 public function playSpeech():void
 {
 for (var i:int = 0; i  5; ++i) {
 sc[i] = speech[i].play();
 }
 }

 Over time, the files start to fall out of sync. I have a timer to move a
 slider marking the speech's progress, and in that, every once in a while, I
 trace the positions of the sound channels. I see variations of more than
 100ms. If I try to correct them I have to first stop that sound and then
 play it from the appropriate position, and that introduces a slight skip.

 The sounds get out of sync even more if I move the positions back and forth
 through a function that is controlled by the slider move event.

 Is there another way to keep these multiple sounds in sync?

 Mat

  



[flexcoders] Problem syncing multiple sound objects playing simultaneously

2008-09-06 Thread Mat Mikul
Hi!

I have an application which plays 5 sound files together sort of like the
following:

var speech:Array = new Array();
var sc:Array = new Array();
var speechPath:Array = { x0.mp3, x1.mp3, x2.mp3, x3.mp3, x4.mp3 };

public function initApp():void
{
 for (var i:int = 0; i  5; ++i) {
 speech[i] = new Sound(speechPath[0]);
 }
}

public function playSpeech():void
{
for (var i:int = 0; i  5; ++i) {
sc[i] = speech[i].play();
}
}

Over time, the files start to fall out of sync. I have a timer to move a
slider marking the speech's progress, and in that, every once in a while, I
trace the positions of the sound channels. I see variations of more than
100ms. If I try to correct them I have to first stop that sound and then
play it from the appropriate position, and that introduces a slight skip.

The sounds get out of sync even more if I move the positions back and forth
through a function that is controlled by the slider move event.

Is there another way to keep these multiple sounds in sync?

Mat