Skip to main content
September 25, 2011
Question

AIR 2.7.1: Help with sound stuttering problem in IOS!

  • September 25, 2011
  • 11 replies
  • 2802 views

Hi all,

I need to play audio in the background but unfortunately, it came out unstable:

- On the 1st run after installing, it'll play fine until it loops, that's when the audio goes out completely.

- On subsequent runs, the audio plays and loops but it stutters.

I have scoured the forums and googled but couldn't find much advice other than the audio settings to use:

- MP3 Compression

- 128 kbps Bit Rate

- 44.1 kHz sample rate

The audio file is in the library and I call it up with the Sound object.

Some additional info, I wrote a custom script to loop my sound:

- I have 2 SoundChannels

- I use a Timer to track the audio progress

- When the 1st channel is almost up, I  play the 2nd channel; the 'old' channel fades out and stops while the 'new' channel plays and fades in

I'm not sure what else I need to look for but any pointers will be great!

Thanks!

This topic has been closed for replies.

11 replies

October 18, 2011

@pixelshocks,

I tried running the tests you attached with the bug. But I was unable to reproduce any stuttering in the playback. Can you please list down the exact steps that will help me to reproduce the issue?

Also, are there any apps running in the background when this issue is encountered? In case there are, can you please see the behavior if there are no apps running in background?

@saariko,

This problem is not related to the issue you are pointing out.

October 18, 2011

Hi AbhishakeVerma,

I managed to run the app on another 3GS device and it's working fine so I guess we can close this issue.

Thanks for spending the time to reply/test, appreciate your help!

Inspiring
October 15, 2011

@AbhishakeVerma,

are these the same sound problems that prevent smooth recording and playing back of mic audio on ios devices? (works great on Android and desktop)

October 11, 2011

@pixelshocks,

In that case, could you please update the bug with files that are actually causing this problem?

Also, could you please tell the iOS version you are using and if this problem is any device specific?

October 14, 2011

I have just updated the bug with new files.

Previously I mentioned I got the example working but after a series of tests, I realize the stuttering occurs again after a few loads.

In all instances, putting the app in bg and bringing it back still stop the stuttering.

I am running on IOS 4.3.2 and only has a iPhone 3GS to test on.

Thanks!

October 9, 2011

Ok, I have just re-installed AIR3 and yes I got significant improvement in the sound quality and the example I gave is working.

However, I am still encountering brief stuttering when there are more stuffs happening on stage.

Putting the app in bg and bringing it back up stops the stuttering though.

Any fix for that or do I file a new bug?

October 6, 2011

Yes that's pretty odd, I just ran the same test on a 3GS and it gave stuttering music.

Perhaps I did not update my AIR properly; I will be running further tests to verify this problem.

I don't own a 3GS/4, so I need some time to get back... will update you again.

Thanks for your time

October 5, 2011

@pixelshocks,

This is strange. I am not able to reproduce the stuttering on the app you shared with the bug, https://bugbase.adobe.com/index.cfm?event=bug&id=2988720, using the AIR 3.

I tried playing audio continuously in foreground, and then after bringing it back up from background. In both the cases, the stuttering doesn't happen anymore. Can you please list the steps to reproduce the problem?

@saariko

For AIR on iOS, you need to download the Windows/Mac sdk. There is no separate runtime installer on iOS.

October 4, 2011

AIR 3 is now live. You can try your application with this.

http://www.adobe.com/products/air.html

October 4, 2011

I have updated to AIR3, the audio is looping now but the stuttering issue still remains... is there any new features I am missing out?

Like AIR2.7, once I put the app into the bg on multitask and bring it back on, I don't get the stuttering anymore.

I am still suspecting it's a memory issue but I am still unable to find any workaround... able to shed some insight on how the stuttering occurs?

Inspiring
October 4, 2011

btw AbhishakeVerma,

why would the new AIR 3 runtime change anything?

when you point out to the new live AIR 3, isn't that the desktop runtimes?

what determines AIR on ios capabilities, bug fixes, etc is the SDK overlayed on Flash or Flex, or new updates of these two, not the desktop runtimes

please correct me if i am wrong

Saar

September 30, 2011

Thanks for the reporting the issue.

We have been able to reproduce the issue you faced here. This problem will be fixed in the next AIR release.

-Abhishake

Inspiring
October 2, 2011

hey i have the same problem

the next AIR release means the official AIR 3?

October 3, 2011

Yes, it means the official AIR 3.

September 30, 2011

Ok I have logged a bug report but I suspect it might be due to memory issues. I am blitting a scene in the bg and removing seems to alleviate (but not solve) the problem.

September 27, 2011

Hi,

I tried to reproduce your problem locally, but was unable to do so. I played an audio in loop through two SoundChannel Objects in background using a timer to alternate between the two. But, I did not find any stutter.

Can you please go ahead and log a bug. Please include the sources and the media file as well.

Thanks.