pub struct AkPlatformInitSettings {
    pub h_wnd: AtomicPtr<c_void>,
    pub thread_lengine: AkThreadProperties,
    pub thread_output_mgr: AkThreadProperties,
    pub thread_bank_manager: AkThreadProperties,
    pub thread_monitor: AkThreadProperties,
    pub num_refills_in_voice: u16,
    pub sample_rate: u32,
    pub enable_avx_support: bool,
    pub max_system_audio_objects: u32,
}

Fields

h_wnd: AtomicPtr<c_void>

Handle to the window associated to the audio. Each game must specify the HWND of the application for device detection purposes. The value returned by GetDefaultPlatformInitSettings is the foreground HWND at the moment of the initialization of the sound engine and may not be the correct one for your game. It is required that each game provides the correct HWND to be used.

thread_lengine: AkThreadProperties

Lower engine threading properties

thread_output_mgr: AkThreadProperties

Ouput thread threading properties

thread_bank_manager: AkThreadProperties

Bank manager threading properties (its default priority is AK_THREAD_PRIORITY_NORMAL)

thread_monitor: AkThreadProperties

Monitor threading properties (its default priority is AK_THREAD_PRIORITY_ABOVENORMAL). This parameter is not used in Release build.

num_refills_in_voice: u16

Number of refill buffers in voice buffer. 2 == double-buffered, defaults to 4.

sample_rate: u32

Sampling Rate. Default is 48000 Hz. Use 24000hz for low quality. Any positive reasonable sample rate is supported. However be careful setting a custom value. Using an odd or really low sample rate may result in malfunctionning sound engine.

enable_avx_support: bool

Enables run-time detection of AVX and AVX2 SIMD support in the engine and plug-ins. Disabling this may improve CPU performance by allowing for higher CPU clockspeeds.

max_system_audio_objects: u32

Dictates how many Microsoft Spatial Sound dynamic objects will be reserved by the System sink. On Windows, other running processes will be prevented from reserving these objects. Set to 0 to disable the use of System Audio Objects. Default is 128.

Trait Implementations

Formats the value using the given formatter. Read more

Gets the default values of the platform-specific initialization settings.

Windows Specific:

When initializing for Windows platform, the HWND value returned in the AkPlatformInitSettings structure is the foreground HWND at the moment of the initialization of the sound engine and may not be the correct one for your need.

Each game must specify the HWND that will be passed to DirectSound initialization.

It is required that each game provides the correct HWND to be used or it could cause one of the following problem:

  • Random Sound engine initialization failure.
  • Audio focus to be located on the wrong window.

Warning This function is not thread-safe.

See also

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.