I'm new to Objective-C and am very confused about the proper way to handle basic audio. I have a simple game complete but have been fighting with sound issues for a few days.
Here is my understanding:
AVAudioPlayer: Seems ideal for playing a longer sound, for example theme music overlaying a game.
AudioServicesPlaySystemSound: Seems ideal for quick sound effects, less than 30 seconds.
Naturally I would proceed thinking I'll use AVAudioPlayer for theme music and SystemSound for my sound effects. Unfortunately, I immediately noticed a very annoying problem - the two are controlled by different volume sources (SystemSoundServices uses ringer volume??) and generally don't play nice together. This cannot be the setup that most apps use.
I then scrapped the AudioServicesPlaySystemSound approach and reprogrammed everything in AVAudioPlayer. This worked fine for volume but caused terrible lag and could not process a quick sequence of sounds. This does not appear to be useful for sound effects.
I'm now looking into OpenAL, which seems like SERIOUS overkill for my simple game. So could somebody please enlighten me - am I missing something or is OpenAL the best way to approach this common music/sfx game format?