Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Time until sound plays?

Hello,

Is there a way to play a sound file immediately after a button is pressed. Right now I have the problem that the sound file needs some time until it is played. It is less then a sec. but in native iPhone apps it is possible to play it instantly. My app is realy simple so that it shouldn't be the code.

Maybe there is a trick?

— asked May 19th 2010 by Robert Ölei
  • media
  • play
  • sound
0 Comments

1 Answer

  • Preload the sound, and onclick play it only.

    If you create the sound when the button is clicked, then it takes a time until is loading it into memory, the bigger the sound, the longer the lag

    — answered May 19th 2010 by Dan Tamas
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.