pub struct Sound { /* private fields */ }
Expand description
Sound object
Implementations§
Source§impl Sound
impl Sound
pub fn get_system_object(&self) -> Result<Sys, Status>
pub fn release(&mut self) -> Status
pub fn play(&self) -> Result<Channel, Status>
pub fn play_with_parameters( &self, paused: bool, channel: &mut Channel, ) -> Status
pub fn play_to_the_end(&self) -> Status
pub fn set_defaults( &self, frequency: f32, volume: f32, pan: f32, priority: i32, ) -> Status
pub fn get_defaults(&self) -> Result<(f32, f32, f32, i32), Status>
pub fn set_variations( &self, frequency_var: f32, volume_var: f32, pan_var: f32, ) -> Status
Sourcepub fn get_variations(&self) -> Result<(f32, f32, f32), Status>
pub fn get_variations(&self) -> Result<(f32, f32, f32), Status>
Returns:
Ok(frequency_var, volume_var, pan_var)
pub fn set_3D_min_max_distance(&self, min: f32, max: f32) -> Status
pub fn set_3D_cone_settings( &self, inside_cone_angle: f32, outside_cone_angle: f32, outside_volume: f32, ) -> Status
Sourcepub fn get_3D_cone_settings(&self) -> Result<(f32, f32, f32), Status>
pub fn get_3D_cone_settings(&self) -> Result<(f32, f32, f32), Status>
Returns:
Ok(inside_cone_angle, outside_cone_angle, outside_volume)
pub fn set_3D_custom_rolloff(&self, points: Vec<Vector>) -> Status
pub fn get_3D_custom_rolloff( &self, num_points: u32, ) -> Result<Vec<Vector>, Status>
pub fn set_sub_sound(&self, index: i32, sub_sound: Sound) -> Status
pub fn get_sub_sound(&self, index: i32) -> Result<Sound, Status>
pub fn get_name(&self, name_len: usize) -> Result<String, RStatus>
pub fn get_length(&self, TimeUnit: TimeUnit) -> Result<u32, Status>
Sourcepub fn get_format(&self) -> Result<(SoundType, SoundFormat, i32, i32), Status>
pub fn get_format(&self) -> Result<(SoundType, SoundFormat, i32, i32), Status>
Returns:
Ok(type, format, channels, bits)
pub fn get_num_sub_sounds(&self) -> Result<i32, Status>
Returns:
Ok(num_tags, num_tags_updated)
pub fn get_tag(&self, name: &str, index: i32) -> Result<FmodTag, Status>
pub fn get_open_state(&self) -> Result<(OpenState, u32, bool, bool), Status>
pub fn set_sound_group(&self, sound_group: SoundGroup) -> Status
pub fn get_sound_group(&self) -> Result<SoundGroup, Status>
pub fn get_num_sync_points(&self) -> Result<i32, Status>
pub fn get_sync_point(&self, index: i32) -> Result<FmodSyncPoint, Status>
pub fn get_sync_point_info( &self, sync_point: FmodSyncPoint, name_len: usize, TimeUnit: TimeUnit, ) -> Result<(String, u32), RStatus>
pub fn add_sync_point( &self, offset: u32, TimeUnit: TimeUnit, name: String, ) -> Result<FmodSyncPoint, Status>
pub fn delete_sync_point(&self, sync_point: FmodSyncPoint) -> Status
pub fn set_mode(&self, Mode: Mode) -> Status
pub fn get_mode(&self) -> Result<Mode, Status>
pub fn set_loop_count(&self, loop_count: i32) -> Status
pub fn get_loop_count(&self) -> Result<i32, Status>
pub fn set_loop_points( &self, loop_start: u32, TimeUnit: TimeUnit, loop_end: u32, TimeUnit: TimeUnit, ) -> Status
Sourcepub fn get_loop_points(
&self,
TimeUnit: TimeUnit,
TimeUnit: TimeUnit,
) -> Result<(u32, u32), Status>
pub fn get_loop_points( &self, TimeUnit: TimeUnit, TimeUnit: TimeUnit, ) -> Result<(u32, u32), Status>
Returns:
Ok(loop_start, loop_end)
pub fn get_num_channels(&self) -> Result<i32, Status>
pub fn set_music_channel_volume(&self, channel: i32, volume: f32) -> Status
pub fn get_music_channel_volume(&self, channel: i32) -> Result<f32, Status>
pub fn set_music_speed(&self, speed: f32) -> Status
pub fn get_music_speed(&self) -> Result<f32, Status>
pub fn set_sub_sound_sentence(&self, sub_sounds: &mut Vec<i32>) -> Status
pub fn seek_data(&self, pcm: u32) -> Status
Sourcepub fn get_memory_info(
&self,
MemoryBits: MemoryBits,
EventMemoryBits: EventMemoryBits,
) -> Result<(u32, MemoryUsageDetails), Status>
pub fn get_memory_info( &self, MemoryBits: MemoryBits, EventMemoryBits: EventMemoryBits, ) -> Result<(u32, MemoryUsageDetails), Status>
Returns:
Ok(memory_used, details)
Sourcepub fn lock(
&self,
offset: u32,
length: u32,
) -> Result<(Vec<u8>, Vec<u8>), Status>
pub fn lock( &self, offset: u32, length: u32, ) -> Result<(Vec<u8>, Vec<u8>), Status>
Returns:
Ok(ptr1, ptr2)
ptr1: Address of a pointer that will point to the first part of the locked data.
ptr2: Address of a pointer that will point to the second part of the locked data. This will be null if the data locked hasn’t wrapped at the end of the buffer.
pub fn unlock(&self, v_ptr1: Vec<u8>, v_ptr2: Vec<u8>) -> Status
pub fn set_user_data<'r, T>(&'r mut self, user_data: &'r mut T) -> Status
pub fn get_user_data<'r, T>(&'r self) -> Result<&'r mut T, Status>
pub fn save_to_wav(&self, file_name: &str) -> Result<bool, String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sound
impl RefUnwindSafe for Sound
impl !Send for Sound
impl !Sync for Sound
impl Unpin for Sound
impl UnwindSafe for Sound
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more