Wwise SDK
Version
menu_open
link
Wwise SDK 2023.1.2
|
AkiOSSoundEngine.h
Go to the documentation of this file.
40 /// The IDs of the iOS audio session categories, useful for defining app-level audio behaviours such as inter-app audio mixing policies and audio routing behaviours. These IDs are funtionally equivalent to the corresponding constants defined by the iOS audio session service backend (AVAudioSession). Refer to Xcode documentation for details on the audio session categories. The original prefix "AV" is replaced with "Ak" for the ID names.
48 AkAudioSessionCategoryAmbient, ///< Audio session category corresponding to the AVAudiosession's AVAudioSessionCategoryAmbient constant
49 AkAudioSessionCategorySoloAmbient, ///< Audio session category corresponding to the AVAudiosession's AVAudioSessionCategorySoloAmbient constant
50 AkAudioSessionCategoryPlayAndRecord, ///< Audio session category corresponding to the AVAudiosession's AVAudioSessionCategoryPlayAndRecord constant
51 AkAudioSessionCategoryPlayback ///< Audio session category corresponding to the AVAudiosession's AVAudioSessionCategoryPlayback constant
52 };
54 /// The IDs of the iOS audio session category options, used for customizing the audio session category features. These IDs are funtionally equivalent to the corresponding constants defined by the iOS audio session service backend (AVAudioSession). Refer to Xcode documentation for details on the audio session category options. The original prefix "AV" is replaced with "Ak" for the ID names.
55 /// \remark These options only have an effect with specific audio session categories. See the documentation for each option to learn which category they affect.
63 AkAudioSessionCategoryOptionMixWithOthers = 1, ///< Same as AVAudioSessionCategoryOptionMixWithOthers. Only affects PlayAndRecord and Playback categories.
64 AkAudioSessionCategoryOptionDuckOthers = 2, ///< Same as AVAudioSessionCategoryOptionDuckOthers. Implicitely sets the MixWithOthers option. Only affects PlayAndRecord and Playback categories.
65 AkAudioSessionCategoryOptionAllowBluetooth = 4, ///< Same as AVAudioSessionCategoryOptionAllowBluetooth. Only affects PlayAndRecord category.
66 AkAudioSessionCategoryOptionDefaultToSpeaker = 8, ///< Same as AVAudioSessionCategoryOptionDefaultToSpeaker. Only affects PlayAndRecord category.
67 AkAudioSessionCategoryOptionAllowBluetoothA2DP = 0x20 ///< Same as AVAudioSessionCategoryOptionAllowBluetoothA2DP. Only affects PlayAndRecord category.
68 };
70 /// The IDs of the iOS audio session modes, used for customizing the audio session for typical app types. These IDs are funtionally equivalent to the corresponding constants defined by the iOS audio session service backend (AVAudioSession). Refer to Xcode documentation for details on the audio session category options. The original prefix "AV" is replaced with "Ak" for the ID names.
77 AkAudioSessionModeDefault = 0, ///< Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeDefault constant
78 AkAudioSessionModeVoiceChat, ///< Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeVoiceChat constant
79 AkAudioSessionModeGameChat, ///< Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeGameChat constant
80 AkAudioSessionModeVideoRecording, ///< Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeVideoRecording constant
81 AkAudioSessionModeMeasurement, ///< Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeMeasurement constant
82 AkAudioSessionModeMoviePlayback, ///< Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeMoviePlayback constant
83 AkAudioSessionModeVideoChat ///< Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeMoviePlayback constant
84 };
86 /// The behavior flags for when iOS audio session is activated. These IDs are functionally equivalent to the corresponding constants defined by the iOS audio session service backend (AVAudioSession). Refer to Xcode documentation for details on the audio session options. The original prefix "AV" is replaced with "Ak" for the ID names.
93 AkAudioSessionSetActiveOptionNotifyOthersOnDeactivation = 1 ///< Audio session activation option corresponding to the AVAudiosession's AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation constant
94 };
96 /// Flags that can modify the default Sound Engine behavior related to the management of the audio session. These do not have equivalences in the official iOS SDK; they apply uniquely to Wwise's approach to interruption handling.
99 AkAudioSessionBehaviorSuspendInBackground = 0x1 ///< By default, the Sound Engine continues to render audio in the background when using PlayAndRecord or Playback categories. Setting this flag causes the Sound Engine to suspend audio rendering when in the background, thus disabling background audio. Only affects Playback and PlayAndRecord audio session categories.
100 };
102 /// The API structure used with AkPlatformInitSettings for specifying iOS audio session for the sound engine.
116 AkAudioSessionBehaviorOptions eAudioSessionBehavior; ///< Flags to change the default Sound Engine behavior related to the management of the iOS Audio Session with regards to application lifecycle events. \sa AkAudioSessionBehaviorFlags
120 ///< Use with AkPlatformInitSettings to select the API used for audio output. The selected API may be ignored if the device does not support it.
121 ///< Use AkAPI_Default, it will select the more appropriate API depending on the device's capabilities. Other values should be used for testing purposes.
125 AkAudioAPI_AVAudioEngine = 1 << 0, ///< Use AVFoundation framework (modern, has more capabilities, not available for iOS/tvOS 12 or below)
126 AkAudioAPI_AudioUnit = 1 << 1, ///< Use AudioUnit framework (basic functionality, compatible with all iOS devices)
127 AkAudioAPI_Default = AkAudioAPI_AVAudioEngine | AkAudioAPI_AudioUnit, ///< Default value, will select the more appropriate API (AVAudioEngine for compatible devices, AudioUnit for others)
136 /// iOS-only callback function prototype used for audio input source plugin. Implement this function to transfer the
143 const AudioBufferList* io_Data, ///< An exposed CoreAudio structure that holds the input audio samples generated from
145 ///< size can be obtained from the structure. Refer to the microphone demo of the IntegrationDemo for an example of usage.
150 /// Implementing this is optional, but useful for application-specific responses to interruptions. For example, an application can enable or disable certain UI elements when an interruption begins and ends.
152 /// - There is no need to call AK::SoundEngine::Suspend() and AK::SoundEngine::WakeupFromSuspend() in this callback. The sound engine call them internally depending on the interruption status.
153 /// - When in_bEnterInterruption is true, this callback is called \a before the sound engine calls AK::SoundEngine::Suspend(), where the user can take actions to prepare for the suspend, e.g., posting global pause events or switching to a special user interface.
154 /// - When in_bEnterInterruption is false, this callback is called \a before the sound engine calls AK::SoundEngine::WakeFromSuspend(). In this callback, the user can restore suspended resources, e.g., post global resume events or switch back to the default user interface.
155 /// - To receive a callback \a after the Sound Engine has woken up from suspend after an interruption, use AK::SoundEngine::RegisterGlobalCallback with the AkGlobalCallbackLocation_WakeupFromSuspend location instead.
164 bool in_bEnterInterruption, ///< Indicating whether or not an interruption is about to start (e.g., an incoming
170 /// Change the category and options of the app's AVAudioSession without restarting the entire Sound Engine.
172 /// As per Apple recommendations, the AVAudioSession will be deactivated and then reactivated. Therefore,
173 /// the primary output device must be reinitialized, which causes all audio to stop for a short period of time.
179 const AkAudioSessionProperties &in_properties ///< New properties to apply to the app's AVAudioSession shared instance.
183 /// Get the motion device ID corresponding to a GCController player index. This device ID can be used to add/remove motion output for that gamepad.
184 /// The player index is 0-based, and corresponds to a value of type GCControllerPlayerIndex in the Core.Haptics framework.
185 /// \note The ID returned is unique to Wwise and does not correspond to any sensible value outside of Wwise.
191 /// The API structure used for specifying all iOS-specific callback functions and user data from the app side.
197 AK::SoundEngine::iOS::AudioInputCallbackFunc inputCallback; ///< Application-defined audio input callback function
198 void* inputCallbackCookie; ///< Application-defined user data for the audio input callback function
199 AK::SoundEngine::iOS::AudioInterruptionCallbackFunc interruptionCallback; ///< Application-defined audio interruption callback function
200 void* interruptionCallbackCookie; ///< Application-defined user data for the audio interruption callback function
212 AkThreadProperties threadBankManager; ///< Bank manager threading properties (its default priority is AK_THREAD_PRIORITY_NORMAL)
213 AkThreadProperties threadMonitor; ///< Monitor threading properties (its default priority is AK_THREAD_PRIORITY_ABOVENORMAL). This parameter is not used in Release build.
217 AkUInt16 uNumRefillsInVoice; ///< Number of refill buffers in voice buffer. 2 == double-buffered, defaults to 4
221 AkAudioAPI eAudioAPI; ///< Main audio API to use. Leave to AkAPI_Default for the default sink (default value).
224 AkUInt32 uNumSpatialAudioPointSources; ///< Number of Apple Spatial Audio point sources to allocate for 3D audio use (each point source is a system audio object). Default: 128
226 bool bVerboseSystemOutput; ///< Print additional debugging information specific to iOS to the system output log.
Definition: AkPlatformFuncs.h:47
@ AkAudioSessionCategoryOptionMixWithOthers
Same as AVAudioSessionCategoryOptionMixWithOthers. Only affects PlayAndRecord and Playback categories...
Definition: AkiOSSoundEngine.h:63
@ AkAudioSessionCategoryPlayback
Audio session category corresponding to the AVAudiosession's AVAudioSessionCategoryPlayback constant.
Definition: AkiOSSoundEngine.h:51
AkAudioSessionCategoryOptions eCategoryOptions
Definition: AkiOSSoundEngine.h:113
AKSOUNDENGINE_API void ChangeAudioSessionProperties(const AkAudioSessionProperties &in_properties)
Definition: AkAndroidSoundEngine.h:55
AK::SoundEngine::iOS::AudioInputCallbackFunc inputCallback
Application-defined audio input callback function.
Definition: AkiOSSoundEngine.h:197
@ AkAudioSessionCategoryOptionAllowBluetooth
Same as AVAudioSessionCategoryOptionAllowBluetooth. Only affects PlayAndRecord category.
Definition: AkiOSSoundEngine.h:65
AkAudioSessionCategory eCategory
Definition: AkiOSSoundEngine.h:112
AKRESULT(* AudioInputCallbackFunc)(const AudioBufferList *io_Data, void *in_pCookie)
Definition: AkiOSSoundEngine.h:142
AK::SoundEngine::iOS::AudioInterruptionCallbackFunc interruptionCallback
Application-defined audio interruption callback function.
Definition: AkiOSSoundEngine.h:199
void * inputCallbackCookie
Application-defined user data for the audio input callback function.
Definition: AkiOSSoundEngine.h:198
@ AkAudioSessionModeMeasurement
Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeMeasurement constant.
Definition: AkiOSSoundEngine.h:81
AkAudioSessionBehaviorOptions
Flags that can modify the default Sound Engine behavior related to the management of the audio sessio...
Definition: AkiOSSoundEngine.h:98
AkThreadProperties threadMonitor
Monitor threading properties (its default priority is AK_THREAD_PRIORITY_ABOVENORMAL)....
Definition: AkAndroidSoundEngine.h:60
AkThreadProperties threadLEngine
Lower engine threading properties.
Definition: AkAndroidSoundEngine.h:57
@ AkAudioSessionModeDefault
Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeDefault constant.
Definition: AkiOSSoundEngine.h:77
@ AkAudioAPI_Default
Default value, will select the more appropriate API (AVAudioEngine for compatible devices,...
Definition: AkiOSSoundEngine.h:127
AkUInt16 uNumRefillsInVoice
Number of refill buffers in voice buffer. Defaults to 4.
Definition: AkAndroidSoundEngine.h:66
Definition: AkiOSSoundEngine.h:111
@ AkAudioSessionCategorySoloAmbient
Audio session category corresponding to the AVAudiosession's AVAudioSessionCategorySoloAmbient consta...
Definition: AkiOSSoundEngine.h:49
void(* AudioInterruptionCallbackFunc)(bool in_bEnterInterruption, void *in_pCookie)
Definition: AkiOSSoundEngine.h:163
@ AkAudioSessionModeVideoChat
Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeMoviePlayback constant.
Definition: AkiOSSoundEngine.h:83
@ AkAudioSessionCategoryAmbient
Audio session category corresponding to the AVAudiosession's AVAudioSessionCategoryAmbient constant.
Definition: AkiOSSoundEngine.h:48
AkUInt32 uNumSpatialAudioPointSources
Number of Apple Spatial Audio point sources to allocate for 3D audio use (each point source is a syst...
Definition: AkiOSSoundEngine.h:224
AkAudioSessionBehaviorOptions eAudioSessionBehavior
Flags to change the default Sound Engine behavior related to the management of the iOS Audio Session ...
Definition: AkiOSSoundEngine.h:116
AkThreadProperties threadOutputMgr
Ouput thread threading properties.
Definition: AkAndroidSoundEngine.h:58
@ AkAudioSessionSetActiveOptionNotifyOthersOnDeactivation
Audio session activation option corresponding to the AVAudiosession's AVAudioSessionSetActiveOptionNo...
Definition: AkiOSSoundEngine.h:93
Definition: AkiOSSoundEngine.h:196
bool bVerboseSystemOutput
Print additional debugging information specific to iOS to the system output log.
Definition: AkiOSSoundEngine.h:226
@ AkAudioSessionCategoryPlayAndRecord
Audio session category corresponding to the AVAudiosession's AVAudioSessionCategoryPlayAndRecord cons...
Definition: AkiOSSoundEngine.h:50
@ AkAudioSessionCategoryOptionDefaultToSpeaker
Same as AVAudioSessionCategoryOptionDefaultToSpeaker. Only affects PlayAndRecord category.
Definition: AkiOSSoundEngine.h:66
@ AkAudioAPI_AudioUnit
Use AudioUnit framework (basic functionality, compatible with all iOS devices)
Definition: AkiOSSoundEngine.h:126
@ AkAudioSessionModeVoiceChat
Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeVoiceChat constant.
Definition: AkiOSSoundEngine.h:78
@ AkAudioSessionBehaviorSuspendInBackground
By default, the Sound Engine continues to render audio in the background when using PlayAndRecord or ...
Definition: AkiOSSoundEngine.h:99
@ AkAudioSessionModeGameChat
Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeGameChat constant.
Definition: AkiOSSoundEngine.h:79
@ AkAudioSessionCategoryOptionAllowBluetoothA2DP
Same as AVAudioSessionCategoryOptionAllowBluetoothA2DP. Only affects PlayAndRecord category.
Definition: AkiOSSoundEngine.h:67
void * interruptionCallbackCookie
Application-defined user data for the audio interruption callback function.
Definition: AkiOSSoundEngine.h:200
@ AkAudioAPI_AVAudioEngine
Use AVFoundation framework (modern, has more capabilities, not available for iOS/tvOS 12 or below)
Definition: AkiOSSoundEngine.h:125
@ AkAudioSessionModeVideoRecording
Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeVideoRecording constant.
Definition: AkiOSSoundEngine.h:80
AkAudioSessionSetActiveOptions eSetActivateOptions
Definition: AkiOSSoundEngine.h:115
AkUInt32 uSampleRate
Sampling Rate. Set to 0 to get the native sample rate. Default value is 0.
Definition: AkAndroidSoundEngine.h:65
AKSOUNDENGINE_API AkDeviceID GetDeviceIDFromPlayerIndex(int playerIndex)
@ AkAudioSessionCategoryOptionDuckOthers
Same as AVAudioSessionCategoryOptionDuckOthers. Implicitely sets the MixWithOthers option....
Definition: AkiOSSoundEngine.h:64
AkThreadProperties threadBankManager
Bank manager threading properties (its default priority is AK_THREAD_PRIORITY_NORMAL)
Definition: AkAndroidSoundEngine.h:59
@ AkAudioSessionModeMoviePlayback
Audio session mode corresponding to the AVAudiosession's AVAudioSessionModeMoviePlayback constant.
Definition: AkiOSSoundEngine.h:82
Cette page a-t-elle été utile ?
Besoin d'aide ?
Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !
Visitez notre page d'AideDécrivez-nous de votre projet. Nous sommes là pour vous aider.
Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !
Partir du bon pied avec Wwise