Wwise SDK
|
Wwise SDK 2023.1.18
|
About this plug-in
This plug-in allows sound designers to use audio from an external source, for example a network stream, or a microphone connected to the PC or console.
Integrating the plug-in
Aside from regular plug-in initialization (see Integration Details - Plug-Ins), integrating the Audio Input plugin requires the game to provide input audio data used by the various instances of the plug-in in the Wwise project. This is done through a callback mechanism, as exposed in AkAudioInputSourceFactory.h:
- At first, the game calls SetAudioInputCallbacks() to set the mandatory AkAudioInputPluginExecuteCallbackFunc which will be called whenever an instance of audio input requires more audio data.
If the audio data is not a mono stream of 32-bit floating point values, the AkAudioInputPluginGetFormatCallbackFunc must be set. This callback only accepts audio data in the following formats, where the left and right channels are stored as shown for a 16-frame buffer:
- interleaved 16-bit integer (also known as planar)
- non-interleaved 32-bit floating point
AkAudioInputPluginGetFormatCallbackFunc uses AkAudioFormat which can be populated as shown in the example below. AkAudioFormat consists of audio data format specifications and channel configuration AkChannelConfig.
AkChannelConfig can be set with the help of one of the calls mentioned below: AkChannelConfig.SetAnonymous(...), AkChannelConfig.SetStandard(...) or AkChannelConfig.SetAmbisonic(...)
ChannelMask: There are no restrictions on channelmask. Standard and custom channelmasks are supported.
Interleaved format (
AK_INTERLEAVED) only supportsAK_INT, and non-interleaved format (AK_NONINTERLEAVED) only supportsAK_FLOAT.- interleaved 16-bit integer (also known as planar)
- Next, the game calls PostEvent to start the audio input plug-in.
- The Sound Engine will call AkAudioInputPluginGetFormatCallbackFunc once at the beginning of playback and then AkAudioInputPluginExecuteCallbackFunc at each audio frame until the plug-in finishes execution (either through a stop action or the execute callback setting AK_NoMoreData on io_pBufferOut->eState).
A very simple integration is demonstrated in the Microphone/AudioInput Demo demo, using a microphone as the input. In the Integration Demo Wwise Project, a Sound Voice named Microphone uses the Audio Input plug-in as a source.
![]() | Note: In Wwise, the audio input plugin is fed with audio from the microphone input of the PC. If no microphone is connected, it will be silent. |
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