Struct rrise::settings::AkPlatformInitSettings
source · [−]#[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: AkThreadPropertiesLower engine threading properties
threadOutputMgr: AkThreadPropertiesOuput thread threading properties
threadBankManager: AkThreadPropertiesBank manager threading properties (its default priority is AK_THREAD_PRIORITY_NORMAL)
threadMonitor: AkThreadPropertiesMonitor threading properties (its default priority is AK_THREAD_PRIORITY_ABOVENORMAL). This parameter is not used in Release build.
uNumRefillsInVoice: u16Number of refill buffers in voice buffer. 2 == double-buffered, defaults to 4.
uSampleRate: AkUInt32Sampling 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: 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.
uMaxSystemAudioObjects: AkUInt32Dictates 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 Clone for AkPlatformInitSettings
impl Clone for AkPlatformInitSettings
sourcefn clone(&self) -> AkPlatformInitSettings
fn clone(&self) -> AkPlatformInitSettings
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
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
impl Copy for AkPlatformInitSettings
Auto Trait Implementations
impl RefUnwindSafe for AkPlatformInitSettings
impl !Send for AkPlatformInitSettings
impl !Sync for AkPlatformInitSettings
impl Unpin for AkPlatformInitSettings
impl UnwindSafe for AkPlatformInitSettings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more