Struct Sys

Source
pub struct Sys { /* private fields */ }
Expand description

FMOD System Object

Implementations§

Source§

impl Sys

Source

pub fn new() -> Result<Sys, Status>

Source

pub fn init(&self) -> Status

Source

pub fn init_with_parameters( &self, max_channels: i32, InitFlag: InitFlag, ) -> Status

Source

pub fn update(&self) -> Status

Source

pub fn release(&mut self) -> Status

Source

pub fn create_sound( &self, music: &str, options: Option<Mode>, exinfo: Option<&mut CreateSoundexInfo>, ) -> Result<Sound, Status>

If music is empty, null is sent

Source

pub fn create_sound_openmemory( &self, music: &[u8], options: Option<Mode>, exinfo: Option<&mut CreateSoundexInfo>, ) -> Result<Sound, Status>

Create sound from a file contained in a byte slice.

Automatically adds the OPENMEMORY mode flag and uses the length of the slice as the exinfo length parameter. Ignores the CREATESTREAM mode flag since this would keep a pointer to the passed in buffer.

Source

pub fn create_stream( &self, music: &str, options: Option<Mode>, exinfo: Option<&mut CreateSoundexInfo>, ) -> Result<Sound, Status>

Source

pub fn create_channel_group( &self, group_name: &str, ) -> Result<ChannelGroup, Status>

Source

pub fn create_sound_group(&self, group_name: &str) -> Result<SoundGroup, Status>

Source

pub fn create_reverb(&self) -> Result<Reverb, Status>

Source

pub fn create_DSP(&self) -> Result<Dsp, Status>

Source

pub fn create_DSP_with_description( &self, description: &mut DspDescription, ) -> Result<Dsp, Status>

Source

pub fn create_DSP_by_type(&self, _type: DspType) -> Result<Dsp, Status>

Source

pub fn set_output(&self, output_type: OutputType) -> Status

Source

pub fn get_output(&self) -> Result<OutputType, Status>

Source

pub fn get_num_drivers(&self) -> Result<i32, Status>

Source

pub fn get_driver_info( &self, id: i32, name_len: usize, ) -> Result<(Guid, String), RStatus>

Source

pub fn get_driver_caps( &self, id: i32, ) -> Result<(FmodCaps, i32, SpeakerMode), Status>

Source

pub fn set_driver(&self, driver: i32) -> Status

Source

pub fn get_driver(&self) -> Result<i32, Status>

Source

pub fn set_hardware_channels(&self, num_hardware_channels: i32) -> Status

Source

pub fn get_hardware_channels(&self) -> Result<i32, Status>

Source

pub fn set_software_channels(&self, num_software_channels: i32) -> Status

Source

pub fn get_software_channels(&self) -> Result<i32, Status>

Source

pub fn set_software_format( &self, sample_rate: i32, format: SoundFormat, num_output_channels: i32, max_input_channels: i32, resample_method: DspResampler, ) -> Status

Source

pub fn get_software_format(&self) -> Result<SoftwareFormat, Status>

Source

pub fn set_DSP_buffer_size( &self, buffer_length: u32, num_buffers: i32, ) -> Status

Source

pub fn get_DSP_buffer_size(&self) -> Result<(u32, i32), Status>

Source

pub fn set_advanced_settings(&self, settings: &mut AdvancedSettings) -> Status

Source

pub fn get_advanced_settings(&self) -> Result<AdvancedSettings, Status>

Source

pub fn set_speaker_mode(&self, speaker_mode: SpeakerMode) -> Status

Source

pub fn get_speaker_mode(&self) -> Result<SpeakerMode, Status>

Source

pub fn set_plugin_path(&self, path: &str) -> Status

Source

pub fn load_plugin( &self, filename: &str, priority: u32, ) -> Result<PluginHandle, Status>

Source

pub fn unload_plugin(&self, PluginHandle: PluginHandle) -> Status

Source

pub fn get_num_plugins(&self, plugin_type: PluginType) -> Result<i32, Status>

Source

pub fn get_plugin_handle( &self, plugin_type: PluginType, index: i32, ) -> Result<PluginHandle, Status>

Source

pub fn get_plugin_info( &self, PluginHandle: PluginHandle, name_len: usize, ) -> Result<(String, PluginType, u32), RStatus>

Source

pub fn set_output_by_plugin(&self, PluginHandle: PluginHandle) -> Status

Source

pub fn get_output_by_plugin(&self) -> Result<PluginHandle, Status>

Source

pub fn create_DSP_by_plugin( &self, PluginHandle: PluginHandle, ) -> Result<Dsp, Status>

Source

pub fn set_3D_num_listeners(&self, num_listeners: i32) -> Status

Source

pub fn get_3D_num_listeners(&self) -> Result<i32, Status>

Source

pub fn set_3D_listener_attributes( &self, listener: i32, pos: &Vector, vel: &Vector, forward: &Vector, up: &Vector, ) -> Status

Source

pub fn get_3D_listener_attributes( &self, listener: i32, ) -> Result<(Vector, Vector, Vector, Vector), Status>

Returns:

Ok(position, velocity, forward, up)

Source

pub fn set_3D_speaker_position( &self, speaker: Speaker, x: f32, y: f32, active: bool, ) -> Status

Source

pub fn get_3D_speaker_position( &self, speaker: Speaker, ) -> Result<(f32, f32, bool), Status>

Returns:

Ok(x, y, is_active)

Source

pub fn set_3D_settings( &self, doppler_scale: f32, distance_factor: f32, roll_off_scale: f32, ) -> Status

Source

pub fn get_3D_settings(&self) -> Result<(f32, f32, f32), Status>

Returns:

Ok(doppler_scale, distance_factor, roll_off_scale)

Source

pub fn set_stream_buffer_size( &self, file_buffer_size: u32, TimeUnit: TimeUnit, ) -> Status

Source

pub fn get_stream_buffer_size(&self) -> Result<(u32, TimeUnit), Status>

Returns:

Ok(file_buffer_size, distance_factor, time)

Source

pub fn get_version(&self) -> Result<u32, Status>

Source

pub fn get_output_handle(&self) -> Result<OutputHandle, Status>

Source

pub fn get_channels_playing(&self) -> Result<i32, Status>

Source

pub fn get_CPU_usage(&self) -> Result<(f32, f32, f32, f32, f32), Status>

Returns:

Ok(dsp, stream, geometry, update, total)

Source

pub fn get_sound_RAM(&self) -> Result<(i32, i32, i32), Status>

Returns:

Ok(current_alloced, max_allocated, total)

Source

pub fn get_num_CDROM_drives(&self) -> Result<i32, Status>

Source

pub fn get_CDROM_drive_name( &self, drive: i32, drive_name_len: usize, scsi_name_len: usize, device_name_len: usize, ) -> Result<(String, String, String), RStatus>

Returns:

Ok(drive_name, scsi_name, device_name)

Source

pub fn get_spectrum( &self, spectrum_size: usize, channel_offset: Option<i32>, window_type: Option<DspFftWindow>, ) -> Result<Vec<f32>, Status>

Source

pub fn get_wave_data( &self, wave_size: usize, channel_offset: i32, ) -> Result<Vec<f32>, Status>

Source

pub fn get_channel(&self, channel_id: i32) -> Result<Channel, Status>

Source

pub fn get_master_channel_group(&self) -> Result<ChannelGroup, Status>

Source

pub fn get_master_sound_group(&self) -> Result<SoundGroup, Status>

Source

pub fn set_reverb_properties(&self, properties: ReverbProperties) -> Status

Source

pub fn get_reverb_properties(&self) -> Result<ReverbProperties, Status>

Source

pub fn set_reverb_ambient_properties( &self, properties: ReverbProperties, ) -> Status

Source

pub fn get_reverb_ambient_properties(&self) -> Result<ReverbProperties, Status>

Source

pub fn get_DSP_head(&self) -> Result<Dsp, Status>

Source

pub fn add_DSP(&self, dsp: &Dsp) -> Result<DspConnection, Status>

Source

pub fn lock_DSP(&self) -> Status

Source

pub fn unlock_DSP(&self) -> Status

Source

pub fn get_DSP_clock(&self) -> Result<(u32, u32), Status>

Returns:

Ok(hi, lo)

Source

pub fn get_record_num_drivers(&self) -> Result<i32, Status>

Source

pub fn get_record_driver_info( &self, id: i32, name_len: usize, ) -> Result<(Guid, String), RStatus>

Source

pub fn get_record_driver_caps( &self, id: i32, ) -> Result<(FmodCaps, i32, i32), Status>

Returns:

Ok(caps, min_frequency, max_frequency)

Source

pub fn get_record_position(&self, id: i32) -> Result<u32, Status>

Source

pub fn start_record(&self, id: i32, sound: &Sound, _loop: bool) -> Status

Source

pub fn stop_record(&self, id: i32) -> Status

Source

pub fn is_recording(&self, id: i32) -> Result<bool, Status>

Source

pub fn create_geometry( &self, max_polygons: i32, max_vertices: i32, ) -> Result<Geometry, Status>

Source

pub fn set_geometry_settings(&self, max_world_size: f32) -> Status

Source

pub fn get_geometry_settings(&self) -> Result<f32, Status>

Source

pub fn get_geometry_occlusion( &self, ) -> Result<(Vector, Vector, f32, f32), Status>

Returns:

Ok(listener, source, direct, reverb)

Source

pub fn get_memory_info( &self, MemoryBits: MemoryBits, EventMemoryBits: EventMemoryBits, ) -> Result<(u32, MemoryUsageDetails), Status>

Returns:

Ok(memory_used, details)

Source

pub fn set_file_system( &self, user_open: FileOpenCallback, user_close: FileCloseCallback, user_read: FileReadCallback, user_seek: FileSeekCallback, block_align: i32, ) -> Status

Trait Implementations§

Source§

impl Drop for Sys

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Sys

§

impl RefUnwindSafe for Sys

§

impl !Send for Sys

§

impl !Sync for Sys

§

impl Unpin for Sys

§

impl UnwindSafe for Sys

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.