I'm very interested in the solution to this. I notice it on certain machines
and not others... it does not seem to have anything to do with the input
part, and in some cases can stutter the display updating. For example, if
you were to have a timer trigger the sound and print something at the
screen, they would both 'appear' at the same time but if you also measured
the time difference between the trigger's execution and after the sound
call, there would be latency.

The superstitious/uneducated part of me supposes that Flash is establishing
a modal call to the sound card, and some perform cards respond faster than
others.
-jonathan


On Mon, Dec 8, 2008 at 2:37 PM, allandt bik-elliott (thefieldcomic.com) <
[EMAIL PROTECTED]> wrote:

> did you use updateAfterEvent() to force it to play immediately? if not, it
> might be waiting for the next frame to process the event
>
> On Mon, Dec 8, 2008 at 12:14 PM, [EMAIL PROTECTED] <
> [EMAIL PROTECTED]> wrote:
>
> > Hi List,
> >
> > I'm dipping my toe into AS3 and thought I'd play around with sound by
> > making
> > a little "piano keyboard" which is played by pressing keys on the
> computer
> > keyboard.
> >
> > It works - the appropriate sounds play on KeyboardEvent.KEY_DOWN -
> however,
> > I've noticed that there is often a lag between the keyboard event and the
> > actual sound playing. The occurrence of the lag seems pretty random.
> >
> > The sounds are MP3s which are load()ed into Sound objects on init(). On
> > KeyboardEvent.KEY_DOWN, the appropriate Sound is play()ed.
> >
> > I've checked all the MP3s, and they don't have extra silence at the
> > beginning. I don't think it has to do with the number of MP3s involved
> > (14),
> > because I noticed the lag even when I was testing it out with 2 sounds.
> >
> > Has anyone dealt with this before, and know what the problem might be?
> You
> > can see (or rather, hear) the lag for yourself here:
> > http://snipurl.com/7ndr2-meep
> >
> > Thanks!
> >
> > In hope,
> > CB.
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
-jonathan howe
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to