Function rrise::sound_engine::init
source · [−]pub fn init(
init_settings: AkInitSettings,
platform_init_settings: AkPlatformInitSettings
) -> Result<(), AkResult>Expand description
Initialize the sound engine.
Warning This function is not thread-safe.
Remark The initial settings should be initialized using AkInitSettings::default and AkPlatformInitSettings::default to fill the structures with their default settings. This is not mandatory, but it helps avoid backward compatibility problems.
Return
- AK_Success if the initialization was successful
- AK_MemManagerNotInitialized if the memory manager is not available or not properly initialized
- AK_StreamMgrNotInitialized if the stream manager is not available or not properly initialized
- AK_SSEInstructionsNotSupported if the machine does not support SSE instruction (only on the PC)
- AK_InsufficientMemory or AK_Fail if there is not enough memory available to initialize the sound engine properly
- AK_InvalidParameter if some parameters are invalid
- AK_Fail if the sound engine is already initialized, or if the provided settings result in insufficient resources for the initialization.
See also