pub struct SystemBuilder { /* private fields */ }
studio
only.Expand description
A builder for creating and initializing a System
.
Handles setting values that can only be set before initialization for you.
Implementations§
Source§impl SystemBuilder
impl SystemBuilder
Sourcepub unsafe fn new() -> Result<Self>
pub unsafe fn new() -> Result<Self>
Creates a new SystemBuilder
.
§Safety
Calling this function concurrently with any FMOD Studio API function (including this function) may cause undefined behavior.
External synchronization must be used if calls to SystemBuilder::new
or System::release
could overlap other FMOD Studio API calls.
All other FMOD Studio API functions are thread safe and may be called freely from any thread unless otherwise documented.
Sourcepub unsafe fn synchronous_update(&mut self)
Available on non-crate feature thread-unsafe
only.
pub unsafe fn synchronous_update(&mut self)
thread-unsafe
only.§Safety
This function sets up FMOD Studio to run all commands on the calling thread, and FMOD Studio expects all calls to be issued from a single thread.
This has the side effect of making EVERY Studio Struct in this crate !Send
and !Sync
without marking them as !Send
and !Sync
.
This means that there are no handrails preventing you from using FMOD Studio across multiple threads, and you must ensure this yourself!
Sourcepub fn settings(&mut self, settings: &AdvancedSettings) -> Result<&mut Self>
pub fn settings(&mut self, settings: &AdvancedSettings) -> Result<&mut Self>
Sets advanced settings.
Sourcepub fn build(
self,
max_channels: c_int,
studio_flags: InitFlags,
flags: InitFlags,
) -> Result<System>
pub fn build( self, max_channels: c_int, studio_flags: InitFlags, flags: InitFlags, ) -> Result<System>
Builds the Studio System.
The core system used by the studio system is initialized at the same time as the studio system.
Sourcepub fn core_builder(&mut self) -> &mut SystemBuilder
pub fn core_builder(&mut self) -> &mut SystemBuilder
Returns the FMOD core SystemBuilder
.
This function only returns a &mut
reference to prevent building the core System
as building the studio System
will handle that for you.
Trait Implementations§
Source§impl Debug for SystemBuilder
impl Debug for SystemBuilder
impl Send for SystemBuilder
thread-unsafe
only.impl Sync for SystemBuilder
thread-unsafe
only.