Struct fmod::SoundGroup
source · 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 moresource§impl Debug for SoundGroup
impl Debug for SoundGroup
source§impl From<*mut FMOD_SOUNDGROUP> for SoundGroup
impl From<*mut FMOD_SOUNDGROUP> for SoundGroup
source§fn from(value: *mut FMOD_SOUNDGROUP) -> Self
fn from(value: *mut FMOD_SOUNDGROUP) -> Self
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
source§fn eq(&self, other: &SoundGroup) -> bool
fn eq(&self, other: &SoundGroup) -> bool
self and other values to be equal, and is used
by ==.