Hi
I am starting a new IOS app the uses AUGraphs and the kAudioUnitSubType_AudioFilePlayer. (All my other apps use Audio Queues) In general IOS apps do not work the same way as OSX apps. For example its really easy to move apps into the background and kind of difficult to actually kill them. It really easy and common to have multiple audio apps running at the same time. (often not intentional but because it is difficult to really kill apps). Clearly hardware and system resources are much more limited, and you have to deal with interrupts like the user received a phone call. Also you want to be careful about battery life.
Most of the sample apps and documentation I have read are OSX based, not IOS. It seem like you construct your graph and start it as soon as possible and just leave it running.
Implementing play/pause/resume using the Audio File Player never stops the graph or the audio unit. It just call reset.
Its not clear to me how best to manage system and hardware resources so that my app is a good IOS "citizen"
For example assume my app is running and currently using codex implemented in hardware. Lets say the user pauses playback in my app (AUGraph is still running audio file player has been reset), gets distracted and switches to another app. Mine is still running in the back ground.
There is a lot of general documentation about how to handle audio session. Is there anything else to be aware of when using Graphs and audio units?
Are there graph/audio unit specific issues that need to be handled in my apps life cycle functions? applicationWillResignActive: applicationDidEnterBackground: applicationWillEnterForeground: applicationDidBecomeActive:applicationWillTerminate:
|