pub struct SoundGroup { /* private fields */ }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.
pub fn set_raw_userdata(&self, userdata: *mut c_void) -> Result<()>
pub fn get_raw_userdata(&self) -> Result<*mut c_void>
Sourcepub fn get_system(&self) -> Result<System>
pub fn get_system(&self) -> Result<System>
Retrieves the parent System object.
Source§impl SoundGroup
impl SoundGroup
pub fn set_userdata(&self, userdata: Userdata) -> Result<()>
pub fn get_userdata(&self) -> Result<Option<Userdata>>
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 [Channel]s for the SoundGroup.
This routine returns the number of [Channel]s playing.
If the SoundGroup only has one Sound, and that Sound is playing twice, the figure returned will be two.
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 more