Hi Mark,

If you compile your sound into your application, you'll get the 
responsiveness you're looking for.  Setsource() always loads at runtime 
(over HTTP) which takes time and increases latency.

There's an example in your LPS installation at examples/audio.lzx.  Let 
me know if you have questions!

-- 
Regards,
Max Carlson
OpenLaszlo.org

Mark Engelberg wrote:
> I'm trying to make it so that clicking a button triggers a clicking
> sound.  This is a very short, rapid sound which can be triggered many
> times in a row, so of course, I want to include it staticly.
> 
> I struggled with the dozens of ways which are supposed to allow one to
> load a sound, but most didn't work.  Finally, I had some success when
> I set up the sound in this way:
> 
>       <view name="clickSfx" play="false">
>               <method name="init">
>                       super.init();
>                       this.setSource('click.mp3');
>               </method>
>       </view>
> 
> Then later, I play the sound by invoking clickSfx.play().
> 
> BUT, Laszlo still isn't playing the sound fast enough to work as a
> click sound effect.  Depending on how fast the button is clicked,
> sometimes the sound doesn't play, sometimes it gets queued up and
> plays delayed.
> 
> Help!  Has anyone figured out how to play a rapidly responsive sound
> effect in Laszlo?
> 
> Thanks,
> 
> Mark
> _______________________________________________
> Laszlo-user mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
> 

_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to