pub struct SoundGroup { /* private fields */ }Expand description
An interface that manages Sound Groups.
Implementations§
Source§impl SoundGroup
impl SoundGroup
Sourcepub fn get_name(&self) -> Result<Utf8CString>
pub fn get_name(&self) -> Result<Utf8CString>
Retrieves the name of the sound group.
Sourcepub fn release(&self) -> Result<()>
pub fn release(&self) -> Result<()>
Releases a soundgroup object and returns all sounds back to the master sound group.
You cannot release the master SoundGroup.
Sourcepub fn get_userdata(&self) -> Result<*mut c_void>
pub fn get_userdata(&self) -> Result<*mut c_void>
Retrieves user data.
Sourcepub fn get_system(&self) -> Result<System>
pub fn get_system(&self) -> Result<System>
Retrieves the parent System object.
Source§impl SoundGroup
impl SoundGroup
Sourcepub fn set_max_audible(&self, max_audible: c_int) -> Result<()>
pub fn set_max_audible(&self, max_audible: c_int) -> Result<()>
Sets the maximum number of playbacks to be audible at once in a sound group.
If playing instances of sounds in this group equal or exceed number specified here, attepts to play more of the sounds with be met with FMOD_RESULT::FMOD_ERR_MAXAUDIBLE by default.
Use SoundGroup::set_max_audible_behavior to change the way the sound playback behaves when too many sounds are playing.
Muting, failing and stealing behaviors can be specified. See SoundGroupBehavior.
SoundGroup::get_playing_count can be used to determine how many instances of the sounds in the SoundGroup are currently playing.
Sourcepub fn get_max_audible(&self) -> Result<c_int>
pub fn get_max_audible(&self) -> Result<c_int>
Retrieves the maximum number of playbacks to be audible at once in a sound group.
Sourcepub fn set_max_audible_behavior(
&self,
behavior: SoundGroupBehavior,
) -> Result<()>
pub fn set_max_audible_behavior( &self, behavior: SoundGroupBehavior, ) -> Result<()>
This function changes the way the sound playback behaves when too many sounds are playing in a soundgroup.
Sourcepub fn get_max_audible_behavior(&self) -> Result<SoundGroupBehavior>
pub fn get_max_audible_behavior(&self) -> Result<SoundGroupBehavior>
Retrieves the current max audible behavior.
Sourcepub fn set_mute_fade_speed(&self, speed: c_float) -> Result<()>
pub fn set_mute_fade_speed(&self, speed: c_float) -> Result<()>
Sets a mute fade time.
If a mode besides SoundGroupBehavior::Mute is used, the fade speed is ignored.
When more sounds are playing in a SoundGroup than are specified with SoundGroup::set_max_audible,
the least important Sound (ie lowest priority / lowest audible volume due to 3D position, volume etc)
will fade to silence if SoundGroupBehavior::Mute is used,
and any previous sounds that were silent because of this rule will fade in if they are more important.
Sourcepub fn get_mute_fade_speed(&self) -> Result<c_float>
pub fn get_mute_fade_speed(&self) -> Result<c_float>
Retrieves the current mute fade time.
Sourcepub fn set_volume(&self, volume: c_float) -> Result<()>
pub fn set_volume(&self, volume: c_float) -> Result<()>
Sets the volume of the sound group.
Sourcepub fn get_volume(&self) -> Result<c_float>
pub fn get_volume(&self) -> Result<c_float>
Retrieves the volume of the sound group.
Source§impl SoundGroup
impl SoundGroup
Sourcepub fn get_sound_count(&self) -> Result<c_int>
pub fn get_sound_count(&self) -> Result<c_int>
Retrieves the current number of sounds in this sound group.
Sourcepub fn get_sound(&self, index: c_int) -> Result<Sound>
pub fn get_sound(&self, index: c_int) -> Result<Sound>
Retrieves a sound.
Use SoundGroup::get_sound_count in conjunction with this function to enumerate all sounds in a SoundGroup.
Sourcepub fn get_playing_count(&self) -> Result<c_int>
pub fn get_playing_count(&self) -> Result<c_int>
Retrieves the number of currently playing Channels for the SoundGroup.
This routine returns the number of Channels playing.
If the SoundGroup only has one Sound, and that Sound is playing twice, the figure returned will be two.
Source§impl SoundGroup
impl SoundGroup
Sourcepub unsafe fn from_ffi(value: *mut FMOD_SOUNDGROUP) -> Self
pub unsafe fn from_ffi(value: *mut FMOD_SOUNDGROUP) -> Self
§Safety
value must be a valid pointer either aquired from Self::as_ptr or FMOD.
§Panics
Panics if value is null.
Sourcepub fn as_ptr(self) -> *mut FMOD_SOUNDGROUP
pub fn as_ptr(self) -> *mut FMOD_SOUNDGROUP
Converts self into its raw representation.
Trait Implementations§
Source§impl Clone for SoundGroup
impl Clone for SoundGroup
Source§fn clone(&self) -> SoundGroup
fn clone(&self) -> SoundGroup
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SoundGroup
impl Debug for SoundGroup
Source§impl From<SoundGroup> for *mut FMOD_SOUNDGROUP
impl From<SoundGroup> for *mut FMOD_SOUNDGROUP
Source§fn from(value: SoundGroup) -> Self
fn from(value: SoundGroup) -> Self
Source§impl Hash for SoundGroup
impl Hash for SoundGroup
Source§impl PartialEq for SoundGroup
impl PartialEq for SoundGroup
impl Copy for SoundGroup
impl Eq for SoundGroup
impl Send for SoundGroup
thread-unsafe only.impl StructuralPartialEq for SoundGroup
impl Sync for SoundGroup
thread-unsafe only.