Hi,
Over the last year I was asking on forums about audio delay problems in my swf's. However I did not receive any answer that could help me. Maybe text only was not enough to explain my problem so now I have made a very simple demo fla and attached it to this post.
Problem: There are circumstances where the audio clock of a swf is stopped for some time and so unacceptable audio delays occur.
Open errorDemo.fla. Please read the comment in the second frame where the few lines of code are explained. Then do "test movie" (ctrl-enter). Now you will hear the audio clock. Now with the mouse: move the movie player window on your screen. You will hear the audio clock is paused. Worse is when pressing on the title bar (on the bar with "errorDemo.swf") with the left mouse button. Now the clock stops even longer (about 250 ms in my case). The same happens when another windows program is started.
There seems to be NO relation with CPU usage and it happened in the same way on several PC's an PPC's and with several Flash player versions and different framerates. My question is: Is it a bug or is there somehow a solution that the audio clock of the movie keeps running when the screen is used?
Of course there is a possibility I am doing something wrong or maybe my expectations for Flash are to high. Please tell me!
I will be of no help, just want to say it seems like a bug to me, as there is no cpu spike at the time. Weather its a flash or os bug i dont know, have you tried to test it on a linux?
I will be of no help, just want to say it seems like a bug to me, as there is no cpu spike at the time. Weather its a flash or os bug i dont know, have you tried to test it on a linux?
yeah audio has to download so the so called delay bug you are exsperiencing is actually the sound file buffering ......make it buffer for awhile before you begin playing it that way it will always be "buffered ahead" and will give smoother play.
I doubt so. Make any FLA with some movement, and hold mouse button down on title bar, it will freeze for a while. And, AFAIR, if you hold it over "X" button, it freezes until you release the button.
Thanks for your reply RealMakc,
I don't want to be rude. But my example contains about 8 lines of code and a WAV sample of 200 ms and flash uses almost zero CPU load. If I use a program like Cubase, I can play back 20 stereo tracks, play an AVI movie, use multiple VST instruments and effects etc. And still it all runs perfectly in sync when another window is opened or similar windows events happen, like dragging one. In my example, using Flash, in a 5 minute movie a 5 second audio delay can be reality. That is unacceptable isn't it?
But still, my appraoch may be wrong, I hope for anwsers, Thanks.
Last edited by Paul de Boer; 08-18-2007 at 05:05 PM.
Hi
Thanks for your reply calmchess, but when a sound is attached it is loaded into ram and not streamed. So a "buffer ahead" doesn't matter very much in this case I think?