Titanium Community Questions & Answer Archive

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

audioplayer vs createsound for local files

Is it possible to use the audioplayer to playback local files?
I wanted to try it to see if the performance was any better on bigger files ('cause creating sounds objects is very slow to start playing) but I can't even get an audioplayer to find a local file…

has anyone found a way to get audio responding/playing quickly (ie. when an object is 'clicked')?


— asked June 8th 2010 by david hoare
  • audioplayer
  • files
  • local
  • sound
1 Comment
  • I have tried 1.6.2, 1.7.x, audioPlayer can play local file by passing the url format of : 'file:///mnt/sdcard/xxx.mp3'.
    But one problem is that the progress event can't be fired with local file.for remote file, the progress event can be fired correctly.

    — commented August 3rd 2011 by Leoncin Lee

1 Answer

  • I got the same issue, createSound can be used with the Titanium.Media.AUDIO_SESSION_MODE_AMBIENT_SOLO then it kinda quick.. BTW the load of a (larger) file takes a while since there is some sort of bug talking about zero points in SDK 1.4.0

    — answered September 16th 2010 by J T
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.