版本

    其他文档

menu_open
AKRESULT __cdecl AK::SoundEngine::WakeupFromSuspend (  ) 

This function should be called to wakeup the sound engine and start processing audio again. This needs to be called if the console has a background mode or some suspended state.

  • Android: Call for APP_CMD_RESUME
  • iOS: On iOS only, reinitialize the sound engine components after performing a suspend (lock) and wakeup (unlock) sequence. This API must be called in the application delegate's applicationDidBecomeActive: method. See the IntegrationDemo's application delegate for an example. It is designed to handle several interruptions incurred by the suspend and wakeup sequence: An interrupted sound engine initialization, preventing the CoreAudio audio session from being activated. The interrupted audio session initialization is then completed by this API later when the app is brought back to the foreground. When the audio session category is other than AkAudioSessionCategoryAmbient, this function will check if ananother app's audio is playing. If true, then the host game's background music (routed to a secondary bus) will be muted; otherwise the background music will be reenabled. This means that the mutual exclusion between the host game's background music and another app's audio can only be executed when user perform a lock/unlock cycle of the device or a foreground/background cycle of the app. When the audio session category is AkAudioSessionCategoryAmbient, the mutual exclusion is managed by the sound engine automatically at any time. When this function fails, e.g. on certain iOS8 devices, call Suspend() agian with in_bRenderAnyway set to true, so that the sound engine can retry waking up later automatically. However, avoid posting events after calling the remedy Suspend(true) so that no accmulated events burst out instantly after waking up.

此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅