pub struct Variation {
pub pitch: f32,
pub gain_db: f32,
}Expand description
Random variation for sounds that repeat, such as footsteps, coins and impacts.
Each start draws a pitch offset uniformly within ±pitch semitones and a gain
within ±gain_db decibels from the mixer’s generator, seeded by
MixerConfig::seed or MixerHandle::reseed. The same seed and the same
sequence of starts give the same variations on every platform.
Fields§
§pitch: f320..=24 semitones.
gain_db: f320..=24 decibels.
Implementations§
Trait Implementations§
impl Copy for Variation
impl StructuralPartialEq for Variation
Auto Trait Implementations§
impl Freeze for Variation
impl RefUnwindSafe for Variation
impl Send for Variation
impl Sync for Variation
impl Unpin for Variation
impl UnsafeUnpin for Variation
impl UnwindSafe for Variation
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