Skip to main content
Inspiring
November 13, 2012
Question

audio delay on android solved

  • November 13, 2012
  • 1 reply
  • 2592 views

Today I realized that files in the application directory are actually in zip format which is why it takes so long for the sound class to load mp3 files. By copying files to the applicationStorageDirectory the sound class can load mp3 files stored there as fast as on iOS. I have to do that anyway because I have more than 50 megs of files. I made an obb file and used fzip to unzip the files. Evidently iOS doesn't have this problem because it unzips the files during the installation process (which is probably why it takes so long to get an app installed).

The delays I was getting was sometimes more than a second and it made my app useless. Unzipping the files made all the difference in the world.

I hope this helps someone else.

This topic has been closed for replies.

1 reply

Inspiring
November 16, 2012

wait your not talking about fixing the Air android audio latency on sound.play() are you?

Inspiring
November 16, 2012

There is still some delay. Air would not be usable as a musical instrument on Android. There is about 150 ms latency. But if you keep your mp3 files in the applicationDirectory the latency can be over a second.

Known Participant
December 4, 2012

what is the "applicationDirectory"?? Where is it??

Thanks