Skip to main content
Inspiring
August 14, 2014
Question

how to fix sound delay in adobe air apps?

  • August 14, 2014
  • 3 replies
  • 3925 views

I am working on this drummer game where the user has to repeat what he listens by tapping on the thouchscreen, but there´s a noticeable delay on Android and iOS. The same game I had it working fine on AS2 for PCs. I don´t know whats the problem in adobe air apps. I hoe someone can help me.

This topic has been closed for replies.

3 replies

Inspiring
July 1, 2018

Does anyone have any news on this subject?

In my experience with apps to learn music there is no problem on iOS. But there is no solution on Android while using Adobe AIR (Adobe Animate).

I´m not saying it is Adobe´s fault but I have seen solutions for this issue out of Adobe.

Any advice?

Best,

natural_criticB837
Legend
July 2, 2018

Adobe is currently working on a fix for ANRs related to sound on Android. There is a fix preview so you could check if the behavior changes and if not it might be a good timing to raise your voice there while they are working on it: https://github.com/Gamua/Adobe-Runtime-Support/issues/29

Colin Holgate
Inspiring
July 2, 2018

I don't know what ANRs are, but it reads like it's something to do with multiple inputs at the same time not being dispatched correctly. That's different to the basic issue with Android sound playing delayed, even on a single sound test.

I logged a bug about it four years ago (July 14th 2014 to be exact). The bug doesn't seem to be in the system anymore.

Preran​ could you see where my bug report went to? It included a simple test file to show the problem. The bug number is 2878728, and the title is "AIR for Android sound playback very delayed on subsequet play() calls". The missing n in subsequent is how I must have typed the title at the time!

The interesting thing is that on iOS the first time a sound is played it may be slightly late, but then it's on time after that. With Android, at least this is how I remember it, the first play of the sound is more or less on time, but subsequent plays are delayed.

I found the test files that I submitted, if anyone wants to try them:

http://colin.scienceninja.com/air-android-sound-delay-test.zip

Inspiring
August 18, 2014

What I have done is:

1. first some tests on iOS. Goes fine after the first play of the sound

2. I´m working on a drums practice app, on iOS. When I finish it I will check it on Android following the advices given here... And I have to check it with the AIR 14.0.0.178.

Best.

Known Participant
August 21, 2014

I came across the lag in sound also.  To handle this, I created a .wav that has sound recorded with no volume for 360 seconds (basically, am empty sound file), which matches the length of my longest level.  When my app (in either Android or ioS) first launches, I play this sound.  This sound file (that has no volume) plays in the background throughout my app, and I cannot notice any more lag in any other sound that is played.  If you are curious to hear the sound performance in my app, I can email you name of the app.

Justin

Inspiring
August 22, 2014

Hi Justin_as3_rules,

That´s a good advice. So far I haven´t had troubles developing my app on iOS. But I will test your advice on iOS and mainly on Android.

Best,

Colin Holgate
Inspiring
August 14, 2014

In my experience, only the first time you play the sound is it delayed on iOS, after that it's pretty instant. On Android it's the opposite, the first time you play the sound it's nearly as good as the worse case iOS delay, but after that it's noticeably delayed, especially on Kindle Fire.

Can you go here and add a note, and vote for the problem to be fixed?:

https://bugbase.adobe.com/index.cfm?event=bug&id=2878728

Inspiring
August 14, 2014

Hi Colin. Thanks for your reply. I already voted on the link you sent me. It´s amazing for me that there are just 10 notes on it. I wonder how many developers have given up on this issue.

Best,

August 18, 2014

I downloaded and tested the sample provided on that bug page and experienced no issues. It wouldn't publish for me at the AIR version the FLA was set to, so I changed it to the latest version of AIR14 and set it to include the AIR runtime with the app. With those two setting changes, I experienced no noticeable delay on my Moto X running Android 4.4.3. So it may be a per device issue or maybe something that was fixed with the current version of AIR. What version were you targeting, what device(s) are you using, and what is the version of the OS on said device(s)?