版本

menu_open
typedef AKRESULT( * AkAudioSourceChangeCallbackFunc)(bool in_bOtherAudioPlaying,void *in_pCookie)

Callback function prototype used for when another app starts or stops playing its audio. It is useful for reacting to user music playback.

Remarks:
  • Under an unmixable audio session category, e.g. AkAudioSessionCategorySoloAmbient, an audio session interruption occurs when another app's audio starts playing, and the interruption callback AudioInterruptionCallbackFunc is called at this time. When another app's audio stops playing while the app remains foreground the whole time, the interruption callback is not called by Apple's design and this callback is called instead. Under a mixable audio session category, e.g. this callback is called both when another app starts and stops playing.
  • When the audio sessoin category is under AkAudioSessionCategoryAmbient, this callback behaves much like the AVFoundation callback for the notification AVAudioSessionSilenceSecondaryAudioHintNotification. In fact, this callback is called via an observer of the notification on devices running iOS 8 and later, after the sound engine handles the muting/unmuting.
  • Before calling this callback, the sound engine checks the playback status of other audio status change and mutes/unmutes registered busses according to that status. When other audio is playing, the sound engine mutes the specified busses, and unmutes them when other audio stops playing.
  • To make the app's audio mutually exclusive (unmixable) with another app's audio, it is recommended to use an unmixable audio session category with AudioInterruptionCallbackFunc instead of this callback.
See also:

Definition at line 93 of file AkSoundEngine.h.


此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅