• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

how to fix sound delay in adobe air apps?

Engaged ,
Aug 14, 2014 Aug 14, 2014

Copy link to clipboard

Copied

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.

TOPICS
Development

Views

3.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 14, 2014 Aug 14, 2014

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 14, 2014 Aug 14, 2014

Copy link to clipboard

Copied

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,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 18, 2014 Aug 18, 2014

Copy link to clipboard

Copied

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)?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 18, 2014 Aug 18, 2014

Copy link to clipboard

Copied

I'm testing on the high end Kindle Fire HDX, which is Android 4.2.2, and on Acer Iconia A500, which has Android 4.0.3. Both show the delay. You should try testing on iOS to see what we expect it to be like.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 18, 2014 Aug 18, 2014

Copy link to clipboard

Copied

By the way, for this test I used the release AIR 14.0.0.178.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 18, 2014 Aug 18, 2014

Copy link to clipboard

Copied

Unfortunately, I do not own an iOS device and from my understanding, you have to have a developer account just to be able to test apps on your device, even if you have no intention of ever publishing something on the store. Correct me if Im wrong on that, but everything I have seen is that the only way to test apps without a developer account is to have a jailbroken device.

I have been building an audiobook player on and off for a while now and tested it on a Galaxy Nexus, Nexus 4, and Nexus 5 in addition to my Moto X. None of those ever experienced any noticeable delays in playback. That is why I was wondering if it is a per device issue. Or it could be that I have just always used vanilla (or extremely close to it) Google Android devices. I understand that the devices I have tested with are most likely in a very low percentage of active devices used aside from the Moto X. I was basically just wanting to jump in to provide my notes on the issue, the device I tested with, and my experience.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 18, 2014 Aug 18, 2014

Copy link to clipboard

Copied

Something else you can try, do a test movie using the AIR Debug Launcher. Then when you click the button the first time you will hear a delay as the sound loads into memory (that happens on Mac OS and iOS, not certain about Windows). Subsequent clicks give instant sound, that's how it is on iOS too.

My bet is that your devices have very little delay, not enough for you to notice, but if you do the above test you'll get to hear what it's like on iOS, and when you compare the test movie instantness against your devices, you'll get a sense of what it's like on less capable Android devices.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 18, 2014 Aug 18, 2014

Copy link to clipboard

Copied

Thanks for your advices . I will follow them.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 18, 2014 Aug 18, 2014

Copy link to clipboard

Copied

You are right Collin. I´m doing tests on iOS. And I already voted.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 18, 2014 Aug 18, 2014

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 21, 2014 Aug 21, 2014

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 22, 2014 Aug 22, 2014

Copy link to clipboard

Copied

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,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 01, 2018 Jul 01, 2018

Copy link to clipboard

Copied

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,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 02, 2018 Jul 02, 2018

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2018 Jul 02, 2018

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 03, 2018 Jul 03, 2018

Copy link to clipboard

Copied

Hi Colin,

I tested your .apk on 2014 and today and the results are the same. Little delay on first time then very noticable delays.

I voted on 2014 for the problem to be fixed here:

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

But its not there anymore.

I haven’t had any problems with iOS but on Android it has been impossible for me to use sound when its needed to be heard at the precise moment the user clicks a button.

So it would be great if Adobe can do something about this. Please help us Preran

Best,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 03, 2018 Jul 03, 2018

Copy link to clipboard

Copied

Adobe are closed this week, so we may not hear from Preran until Monday.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 20, 2018 Jul 20, 2018

Copy link to clipboard

Copied

I think Preran

has not seen these last comments. I wish you can Preran

Best,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 04, 2018 Jul 04, 2018

Copy link to clipboard

Copied

>on Android it has been impossible for me to use sound when its needed to be heard at the precise moment the user clicks a button.

....it may not be an AIR issue per se - even with a highly optimal framework like JUCE audio performance is dreadful on Android see these benchmarks: JUCE

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 04, 2018 Jul 04, 2018

Copy link to clipboard

Copied

See "correct answer" on this thread from 2010:

Sound.play() delay

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 07, 2019 Feb 07, 2019

Copy link to clipboard

Copied

LATEST

Seems nobody is paying attention to this issue which has been sitting there since 2010.

It would be great if someone at Adobe would give us some assistance here.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines