Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

0 votes
When playing music from the music player, wwise stops every sound, as it should be, but when the user pauses the music player, no sound is heard anymore, not even when new PostEvent are sent.

Is there any functions to call when the user pauses the music player I can call to resume wwise activity?

Thanks!
in General Discussion by David R. (180 points)

1 Answer

0 votes

What audio session category do you use? By default, Wwise uses kAudioSessionCategory_SoloAmbientSound. Along with kAudioSessionCategory_PlayAndRecord, under these audio session categories, only one audio app can be active on the device (Refer to Xcode documenatation for detail). So the music player may act as an audio session interruption to kill your app's audio. You'll then need to register a user callback to bring the audio back after the interruption ends. See the example in the IntegrationDemo for iOS. The example uses a callback DemoInterruptCallbackFunc() to register an UIAlertView for user to actively restore the app's audio. Note that this kind of UI-driven "active restoration" is only necessary for interruption from the Remove-Control (including the Control Center, and the ear-bud) and the Music app. Other interruptions such as a phone call or an alarm do not need the active restoration; the sound engine can handle the restoration automatically when the intrruption is over.

On the other hand, using the audio session catetory kAudioSessionCategory_AmbientSound, all apps' audio can mix with each other, bypassing the interruption problem.

You are recommended to read the SDK doc for the iOS-only callback: AudioInterruptionCallbackFunc() and the related topics.

 

 

by Beinan L. (Audiokinetic) (1.2k points)
edited by Beinan L. (Audiokinetic)
When Siri or Face time or Alarm interrupts, audio is lost in the app that uses kAudioSessionCategory_AmbientSound audio session category. In AudioInterruptionCallbackFunc what should be done/called to restore the audio?
...