Sound delay using Flash sounds

62 views
Skip to first unread message

retroactive

unread,
May 31, 2012, 10:30:12 AM5/31/12
to gwt-voices
hi,

i am using the latest version of gwt voices (2.1.8) for button click
sounds.
html5 with mp4 and ogg work as expected but flash sounds have a small
delay (~150-200ms?) when being played.
this happens on every browser when being forced to play using flash.
if i remember correctly there was no delay when i was using gwt voices
a few years ago for the exact same thing (button click sounds).

i read somewhere there are were some issues with flash itself and
delay, maybe they introduced a bug in later flash versions?
anyone noticed this?

cu

Malte

retroactive

unread,
May 31, 2012, 11:05:07 AM5/31/12
to gwt-voices
i just exchanged the "gwt-voices.swf" file manually with the old swf
file from the "Hornet Blast" demo (885bytes).
now the delay is gone! maybe we need a recompiled (or older) version
of the swf file?

Fred Sauer

unread,
May 31, 2012, 1:43:38 PM5/31/12
to gwt-v...@googlegroups.com
The "default" sound implementation has changed quite a bit over the years. It has been Flash, HTML5 and Web Audio.

The only API which supports low latency, reliable, playback is the Web Audio API, which should be the default on Chrome and Webkit nightlies.

I'm not sure what would introduce an additional delay when comparing older gwt-voices / Flash with newer ones. I did at some point switch from the Motion Twin compiler to the Flex compiler (MXMLC), at the same time bumping the Flash language version. It possible that the newer .swf ActionScript version comes with some additional call overhead.



--
You received this message because you are subscribed to the Google Groups "gwt-voices" group.
To post to this group, send email to gwt-v...@googlegroups.com.
To unsubscribe from this group, send email to gwt-voices+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-voices?hl=en.




--
Fred Sauer
fr...@allen-sauer.com

retroactive

unread,
May 31, 2012, 5:10:30 PM5/31/12
to gwt-voices
the delay is quite okay for html5 (mp3/ogg) on internet explorer/
firefox.
i am not sure if it's only actionscript overhead as it is really
noticeable (>100ms)

maybe i have some time tomorrow to build a demo.
as i said, i only exchanged the swf file, gwt-voices is still the
latest version.

is it safe to use the old .swf files or did you fix some memory leaks
or something important?
maybe i should compile my own .swf with the given source code :)

Fred Sauer

unread,
May 31, 2012, 5:30:41 PM5/31/12
to gwt-v...@googlegroups.com
The swf API has changed a bit, but if an old one works, feel free to use it. No memory leak fixes or anything like that.

Also, feel free to compile your own. The current build uses the Flex compiler. If you dig through the git history you'll find the old MotionTwin compiler options if you'd prefer to use that.


--
You received this message because you are subscribed to the Google Groups "gwt-voices" group.
To post to this group, send email to gwt-v...@googlegroups.com.
To unsubscribe from this group, send email to gwt-voices+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-voices?hl=en.




--
Fred Sauer
fr...@allen-sauer.com

retroactive

unread,
Jun 1, 2012, 7:52:35 AM6/1/12
to gwt-voices
i made a small demo:

http://turrican.tvc-software.com/soundtest/Soundtest.html

it is not as noticeable as in my game but if you use firefox and click
slowly with pauses (not rapidly) there is sometimes a lag, this never
happens with the old swf.
> f...@allen-sauer.com

Fred Sauer

unread,
Jun 1, 2012, 2:35:32 PM6/1/12
to gwt-v...@googlegroups.com
Interesting. I wonder if its due to ActionScript 2 -> 3
fr...@allen-sauer.com
Reply all
Reply to author
Forward
0 new messages