#[repr(C)]
pub struct AkPlatformInitSettings { pub hWnd: *mut HWND__, pub threadLEngine: AkThreadProperties, pub threadOutputMgr: AkThreadProperties, pub threadBankManager: AkThreadProperties, pub threadMonitor: AkThreadProperties, pub uNumRefillsInVoice: u16, pub uSampleRate: AkUInt32, pub bEnableAvxSupport: bool, pub uMaxSystemAudioObjects: AkUInt32, }
Expand description

\cond !(Web) Platform specific initialization settings \sa AK::SoundEngine::Init \sa AK::SoundEngine::GetDefaultPlatformInitSettings

Fields

hWnd: *mut HWND__

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.

threadLEngine: AkThreadProperties

Lower engine threading properties

threadOutputMgr: AkThreadProperties

Ouput thread threading properties

threadBankManager: AkThreadProperties

Bank manager threading properties (its default priority is AK_THREAD_PRIORITY_NORMAL)

threadMonitor: AkThreadProperties

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

uNumRefillsInVoice: u16

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

uSampleRate: AkUInt32

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.

bEnableAvxSupport: 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.

uMaxSystemAudioObjects: AkUInt32

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.