pub fn set_attributes(
kind: ThreadType,
affinity: ThreadAffinity,
priority: FMOD_THREAD_PRIORITY,
stack_size: FMOD_THREAD_STACK_SIZE,
) -> Result<()>
Expand description
Specify the affinity, priority and stack size for all FMOD created threads.
You must call this function for the chosen thread before that thread is created for the settings to take effect.
Affinity can be specified using one (or more) of the ThreadAffinity
constants or by providing the bits explicitly, i.e. (1<<3) for logical core three (core affinity is zero based).
See platform documentation for details on the available cores for a given device.
Priority can be specified using one of the FMOD_THREAD_PRIORITY
constants or by providing the value explicitly, i.e. (-2) for the lowest thread priority on Windows.
See platform documentation for details on the available priority values for a given operating system.
Stack size can be specified explicitly, however for each thread you should provide a size equal to or larger than the expected default or risk causing a stack overflow at runtime.