pub struct System { /* private fields */ }
Implementations
sourceimpl System
impl System
pub fn from(pointer: *mut FMOD_SYSTEM) -> Self
pub fn as_mut_ptr(&self) -> *mut FMOD_SYSTEM
pub fn create() -> Result<System, Error>
pub fn release(&self) -> Result<(), Error>
pub fn set_output(&self, output: OutputType) -> Result<(), Error>
pub fn get_output(&self) -> Result<OutputType, Error>
pub fn get_num_drivers(&self) -> Result<i32, Error>
pub fn get_driver_info(
&self,
id: i32,
namelen: i32
) -> Result<(String, Guid, i32, SpeakerMode, i32), Error>
pub fn set_driver(&self, driver: i32) -> Result<(), Error>
pub fn get_driver(&self) -> Result<i32, Error>
pub fn set_software_channels(
&self,
numsoftwarechannels: i32
) -> Result<(), Error>
pub fn get_software_channels(&self) -> Result<i32, Error>
pub fn set_software_format(
&self,
samplerate: Option<i32>,
speakermode: Option<SpeakerMode>,
numrawspeakers: Option<i32>
) -> Result<(), Error>
pub fn get_software_format(&self) -> Result<(i32, SpeakerMode, i32), Error>
pub fn set_dsp_buffer_size(
&self,
bufferlength: u32,
numbuffers: i32
) -> Result<(), Error>
pub fn get_dsp_buffer_size(&self) -> Result<(u32, i32), Error>
pub fn set_file_system(
&self,
useropen: FMOD_FILE_OPEN_CALLBACK,
userclose: FMOD_FILE_CLOSE_CALLBACK,
userread: FMOD_FILE_READ_CALLBACK,
userseek: FMOD_FILE_SEEK_CALLBACK,
userasyncread: FMOD_FILE_ASYNCREAD_CALLBACK,
userasynccancel: FMOD_FILE_ASYNCCANCEL_CALLBACK,
blockalign: Option<i32>
) -> Result<(), Error>
pub fn attach_file_system(
&self,
useropen: FMOD_FILE_OPEN_CALLBACK,
userclose: FMOD_FILE_CLOSE_CALLBACK,
userread: FMOD_FILE_READ_CALLBACK,
userseek: FMOD_FILE_SEEK_CALLBACK
) -> Result<(), Error>
pub fn set_advanced_settings(
&self,
settings: AdvancedSettings
) -> Result<(), Error>
pub fn get_advanced_settings(&self) -> Result<AdvancedSettings, Error>
pub fn set_callback(
&self,
callback: FMOD_SYSTEM_CALLBACK,
callbackmask: FMOD_SYSTEM_CALLBACK_TYPE
) -> Result<(), Error>
pub fn set_plugin_path(&self, path: &str) -> Result<(), Error>
pub fn load_plugin(
&self,
filename: &str,
priority: Option<u32>
) -> Result<u32, Error>
pub fn unload_plugin(&self, handle: u32) -> Result<(), Error>
pub fn get_num_nested_plugins(&self, handle: u32) -> Result<i32, Error>
pub fn get_nested_plugin(&self, handle: u32, index: i32) -> Result<u32, Error>
pub fn get_num_plugins(&self, plugintype: PluginType) -> Result<i32, Error>
pub fn get_plugin_handle(
&self,
plugintype: PluginType,
index: i32
) -> Result<u32, Error>
pub fn get_plugin_info(
&self,
handle: u32,
namelen: i32
) -> Result<(PluginType, String, u32), Error>
pub fn set_output_by_plugin(&self, handle: u32) -> Result<(), Error>
pub fn get_output_by_plugin(&self) -> Result<u32, Error>
pub fn create_dsp_by_plugin(&self, handle: u32) -> Result<Dsp, Error>
pub fn get_dsp_info_by_plugin(
&self,
handle: u32
) -> Result<Vec<DspDescription>, Error>
pub fn register_codec(
&self,
description: CodecDescription,
priority: Option<u32>
) -> Result<u32, Error>
pub fn register_dsp(&self, description: DspDescription) -> Result<u32, Error>
pub fn register_output(
&self,
description: OutputDescription
) -> Result<u32, Error>
pub fn init(
&self,
maxchannels: i32,
flags: FMOD_INITFLAGS,
extradriverdata: Option<*mut c_void>
) -> Result<(), Error>
pub fn close(&self) -> Result<(), Error>
pub fn update(&self) -> Result<(), Error>
pub fn set_speaker_position(
&self,
speaker: Speaker,
x: f32,
y: f32,
active: bool
) -> Result<(), Error>
pub fn get_speaker_position(
&self,
speaker: Speaker
) -> Result<(f32, f32, bool), Error>
pub fn set_stream_buffer_size(
&self,
filebuffersize: u32,
filebuffersizetype: FMOD_TIMEUNIT
) -> Result<(), Error>
pub fn get_stream_buffer_size(&self) -> Result<(u32, FMOD_TIMEUNIT), Error>
pub fn set_3d_settings(
&self,
dopplerscale: f32,
distancefactor: f32,
rolloffscale: f32
) -> Result<(), Error>
pub fn get_3d_settings(&self) -> Result<(f32, f32, f32), Error>
pub fn set_3d_num_listeners(&self, numlisteners: i32) -> Result<(), Error>
pub fn get_3d_num_listeners(&self) -> Result<i32, Error>
pub fn set_3d_listener_attributes(
&self,
listener: i32,
pos: Option<Vector>,
vel: Option<Vector>,
forward: Option<Vector>,
up: Option<Vector>
) -> Result<(), Error>
pub fn get_3d_listener_attributes(
&self,
listener: i32
) -> Result<(Vector, Vector, Vector, Vector), Error>
pub fn set_3d_rolloff_callback(
&self,
callback: FMOD_3D_ROLLOFF_CALLBACK
) -> Result<(), Error>
pub fn mixer_suspend(&self) -> Result<(), Error>
pub fn mixer_resume(&self) -> Result<(), Error>
pub fn get_default_mix_matrix(
&self,
sourcespeakermode: SpeakerMode,
targetspeakermode: SpeakerMode,
matrixhop: Option<i32>
) -> Result<f32, Error>
pub fn get_speaker_mode_channels(&self, mode: SpeakerMode) -> Result<i32, Error>
pub fn get_version(&self) -> Result<u32, Error>
pub fn get_output_handle(&self) -> Result<*mut c_void, Error>
pub fn get_channels_playing(&self) -> Result<(i32, i32), Error>
pub fn get_cpu_usage(&self) -> Result<CpuUsage, Error>
pub fn get_file_usage(&self) -> Result<(i64, i64, i64), Error>
pub fn create_sound(
&self,
name_or_data: &str,
mode: FMOD_MODE,
exinfo: Option<CreateSoundexInfo>
) -> Result<Sound, Error>
pub fn create_stream(
&self,
name_or_data: &str,
mode: FMOD_MODE,
exinfo: Option<CreateSoundexInfo>
) -> Result<Sound, Error>
pub fn create_dsp(&self, description: DspDescription) -> Result<Dsp, Error>
pub fn create_dsp_by_type(&self, type_: DspType) -> Result<Dsp, Error>
pub fn create_channel_group(
&self,
name: Option<String>
) -> Result<ChannelGroup, Error>
pub fn create_sound_group(&self, name: &str) -> Result<SoundGroup, Error>
pub fn create_reverb_3d(&self) -> Result<Reverb3d, Error>
pub fn play_sound(
&self,
sound: Sound,
channelgroup: Option<ChannelGroup>,
paused: bool
) -> Result<Channel, Error>
pub fn play_dsp(
&self,
dsp: Dsp,
channelgroup: Option<ChannelGroup>,
paused: bool
) -> Result<Channel, Error>
pub fn get_channel(&self, channelid: i32) -> Result<Channel, Error>
pub fn get_dsp_info_by_type(
&self,
type_: DspType
) -> Result<Vec<DspDescription>, Error>
pub fn get_master_channel_group(&self) -> Result<ChannelGroup, Error>
pub fn get_master_sound_group(&self) -> Result<SoundGroup, Error>
pub fn attach_channel_group_to_port(
&self,
port_type: PortType,
port_index: u64,
channelgroup: ChannelGroup,
pass_thru: bool
) -> Result<(), Error>
pub fn detach_channel_group_from_port(
&self,
channelgroup: ChannelGroup
) -> Result<(), Error>
pub fn set_reverb_properties(
&self,
instance: i32,
prop: ReverbProperties
) -> Result<(), Error>
pub fn get_reverb_properties(
&self,
instance: i32
) -> Result<ReverbProperties, Error>
pub fn lock_dsp(&self) -> Result<(), Error>
pub fn unlock_dsp(&self) -> Result<(), Error>
pub fn get_record_num_drivers(&self) -> Result<(i32, i32), Error>
pub fn get_record_driver_info(
&self,
id: i32,
namelen: i32
) -> Result<(String, Guid, i32, SpeakerMode, i32, FMOD_DRIVER_STATE), Error>
pub fn get_record_position(&self, id: i32) -> Result<u32, Error>
pub fn record_start(
&self,
id: i32,
sound: Sound,
loop_: bool
) -> Result<(), Error>
pub fn record_stop(&self, id: i32) -> Result<(), Error>
pub fn is_recording(&self, id: i32) -> Result<bool, Error>
pub fn create_geometry(
&self,
maxpolygons: i32,
maxvertices: i32
) -> Result<Geometry, Error>
pub fn set_geometry_settings(&self, maxworldsize: f32) -> Result<(), Error>
pub fn get_geometry_settings(&self) -> Result<f32, Error>
pub fn load_geometry(
&self,
data: *const c_void,
datasize: i32
) -> Result<Geometry, Error>
pub fn get_geometry_occlusion(
&self,
listener: Vector,
source: Vector
) -> Result<(f32, f32), Error>
pub fn set_network_proxy(&self, proxy: &str) -> Result<(), Error>
pub fn get_network_proxy(&self, proxylen: i32) -> Result<String, Error>
pub fn set_network_timeout(&self, timeout: i32) -> Result<(), Error>
pub fn get_network_timeout(&self) -> Result<i32, Error>
pub fn set_user_data(&self, userdata: *mut c_void) -> Result<(), Error>
pub fn get_user_data(&self) -> Result<*mut c_void, Error>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for System
impl !Send for System
impl !Sync for System
impl Unpin for System
impl UnwindSafe for System
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more