TAAE 1.4.6 with iOS 10 unexpected audio behavior

We're updating our app for iOS 10 while using TAAE 1.4.6 and have noticed some strange audio behavior. We're able to consistently reproduce an error where audio is started while the app is in the foreground, then we transition the app to the background with audio still playing. At some point (random amount of time) while in the background, audio will completely stop. Our app is properly configured to continue playing audio in the background and was working well on iOS 9.

Debugging has led us to AEBufferedAudioFilePlayer.m, where we believe the dispatch_queue_t loader_queue thread property is being killed prematurely (possibly by some parent process being killed). Here are two log outputs of the dispatch_queue_t loader_queue property, the first while audio is playing normally, and the second when audio was halted:

(lldb) po loader_queue
<OS_dispatch_queue: com.theamazingaudioengine.bufferedfileloader.queue[0x170360900] = { xrefcnt = 0x1, refcnt = 0x3, target = com.apple.root.default-qos.overcommit[0x100eb55c0], width = 0x1, state = 0x0030000800000f03, dirty, draining on 0xf03, in-barrier}>

(lldb) po loader_queue
<OS_dispatch_queue: com.theamazingaudioengine.bufferedfileloader.queue[0x17417e600] = { xrefcnt = 0x1, refcnt = 0x2, target = com.apple.root.default-qos.overcommit[0x100e755c0], width = 0x1, state = 0x000fffe000000000, in-flight = 0}>

Has anyone else noticed these audio issues with iOS 10? Any help would be great. Thanks.

Comments

  • Hey @hgwhittle - hmm, where did you get your TAAE version from? I don't recognise either "AEBufferedAudioFilePlayer" or "com.theamazingaudioengine.bufferedfileloader" - that's not part of TAAE, as far as I know, and a Google search turns up nothing.

  • Hi @Michael, I appreciate you taking time to respond. I apologize, the AEBufferedAudioFilePlayer class was inherited from a previous developer who evidently named it according to TAAE conventions, resulting in some confusion. After further investigation we realized that iOS 10 was killing a timer that was running very aggressively on the thread mentioned above. We've since refactored to remove the timer. This thread can be deleted if you like.

Sign In or Register to comment.