Wwise 版本
arrow_right 目录
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.