pub struct AudioVoice {Show 16 fields
pub id: u64,
pub sound_id: u64,
pub category: SoundCategory,
pub position: Vec3,
pub volume_db: f32,
pub priority_score: f32,
pub distance: f32,
pub lod_level: AudioLodLevel,
pub is_active: bool,
pub is_virtual: bool,
pub start_time_s: f64,
pub age_s: f32,
pub spatializer: Spatializer3D,
pub design_params: SoundDesignParams,
pub bus_id: u64,
pub importance: f32,
}Fields§
§id: u64§sound_id: u64§category: SoundCategory§position: Vec3§volume_db: f32§priority_score: f32§distance: f32§lod_level: AudioLodLevel§is_active: bool§is_virtual: bool§start_time_s: f64§age_s: f32§spatializer: Spatializer3D§design_params: SoundDesignParams§bus_id: u64§importance: f32Implementations§
Source§impl AudioVoice
impl AudioVoice
pub fn new( id: u64, sound_id: u64, category: SoundCategory, position: Vec3, ) -> Self
pub fn compute_priority(&mut self, listener_pos: Vec3) -> f32
pub fn determine_lod( &mut self, listener_pos: Vec3, voice_budget_fraction: f32, ) -> AudioLodLevel
Trait Implementations§
Source§impl Clone for AudioVoice
impl Clone for AudioVoice
Auto Trait Implementations§
impl Freeze for AudioVoice
impl RefUnwindSafe for AudioVoice
impl Send for AudioVoice
impl Sync for AudioVoice
impl Unpin for AudioVoice
impl UnsafeUnpin for AudioVoice
impl UnwindSafe for AudioVoice
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.