Struct rrise::settings::AkPlatformInitSettings
source · 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: AkThreadPropertiesLower engine threading properties
thread_output_mgr: AkThreadPropertiesOuput thread threading properties
thread_bank_manager: AkThreadPropertiesBank manager threading properties (its default priority is AK_THREAD_PRIORITY_NORMAL)
thread_monitor: AkThreadPropertiesMonitor threading properties (its default priority is AK_THREAD_PRIORITY_ABOVENORMAL). This parameter is not used in Release build.
num_refills_in_voice: u16Number of refill buffers in voice buffer. 2 == double-buffered, defaults to 4.
sample_rate: u32Sampling 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: boolEnables 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: u32Dictates 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
sourceimpl Debug for AkPlatformInitSettings
impl Debug for AkPlatformInitSettings
sourceimpl Default for AkPlatformInitSettings
impl Default for AkPlatformInitSettings
sourcefn default() -> Self
fn default() -> Self
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