I made an iphone application that uses OpenAL to play many sounds. These sounds in mp3 are quite heavy (over 1 million), and I translate them (2 buffers per sound) in order to use less memory. To control interrupts, I use this code:
In the OpenALSupport.c file:
In my SoundManager.m file:
- (void) restoreOpenAL { restoreOpenAL(mContext); }
And finally, in my AppDelegate:
- (void)applicationDidBecomeActive:(UIApplication *)application { [[CSoundManager getInstance] restoreOpenAL]; ... }
With this method, sounds are returned after the call, but the streams seem to play randomly. Is there a specific way to control interruption with streaming sounds? I can not find an article about this.
Thank you for your help.
source share