menu
 

La section Questions et réponses de la communauté Audiokinetic est un forum où les utilisateurs de Wwise et de Strata peuvent poser des questions et répondre à celles des autres membres de la communauté. Si vous souhaitez obtenir une réponse de la part de l'équipe de soutien technique d'Audiokinetic, veillez à utiliser le formulaire de Tickets de Soutien.

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!
dans General Discussion par David R. (180 points)

1 Réponse

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.

 

 

par Beinan L. (Audiokinetic) (1.2k points)
edité par 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?
...