Wwise SDK 2021.1.8
By default, the Wwise Sound Engine does all its command processing and audio rendering in a dedicated thread named
AK::EventManager, controlled by the AkPlatformInitSettings::threadLEngine parameters. Calling
AK::SoundEngine::RenderAudio signals the end of a game frame and allows the thread to consume all API commands received since the previous call to
false disables this thread and causes
RenderAudio to run synchronously: processing commands and, if needed, rendering audio. The actual rate of audio output remains controlled by the audio endpoint. If the
RenderAudio call interval is shorter than the buffer period determined by
AkInitSettings::uNumSamplesPerFrame and the output sample rate, some calls to
RenderAudio will skip the audio rendering portion. Conversely, if the
RenderAudio call interval is longer than the output buffer period,
RenderAudio may process more than one buffer at a time, causing a CPU usage spike, and may eventually cause the audio to stutter.
Enabling offline rendering disables asynchronous command processing and audio rendering from the audio thread. The amount of audio rendered per call to
RenderAudio is determined by a positive non-zero value sent to
AK::SoundEngine::SetOfflineRenderingFrameTime. A zero or negative value will force
RenderAudio to process precisely one audio buffer.
Caution: With the audio rendering thread disabled or with offline rendering enabled, synchronous
On Microsoft platforms, due to the use of a single-threaded apartment (STA) concurrency model,
CoInitializeEx() must be called from the same thread that calls
AK::SoundEngine::RenderAudio when setting
By default, the Wwise Sound Engine executes Bus and Voice processing on the audio rendering thread.
Parallel execution of individual Bus and Voice tasks can be enabled via
AkInitSettings::taskSchedulerDesc. Wwise will call the
AkTaskSchedulerDesc::fcnParallelFor callback for any group of tasks that can be safely executed concurrently. This request can be passed along to a game-side task scheduler, which can divide the range for execution across worker threads.
Note: When enabling parallel execution, some
|Note: Some plug-ins may not be compatible with parallel execution.|