pub struct SourceAcoustics {
pub transmission: f32,
pub gain_db: f32,
pub lowpass_cutoff_hz: f32,
pub reverb_send_db: f32,
}Expand description
Occlusion-driven playback parameters for one source→listener pair,
produced by source_acoustics. Feed them to the playback layer
with short tweens (~120 ms) — never as raw jumps.
Fields§
§transmission: f32Average transmitted energy across the ray fan, 0..=1
(1 = clear line of sound, 0 = buried).
gain_db: f32Occlusion gain, decibels (0 when clear, down to
AcousticsConfig::max_occlusion_db). Excludes distance
attenuation.
lowpass_cutoff_hz: f32Lowpass cutoff for the muffling filter, Hz (log-interpolated between the config’s occluded and open cutoffs).
reverb_send_db: f32Gain for this source’s reverb send, decibels.
Implementations§
Source§impl SourceAcoustics
impl SourceAcoustics
Sourcepub fn clear(cfg: &AcousticsConfig) -> Self
pub fn clear(cfg: &AcousticsConfig) -> Self
The parameters of a fully unoccluded source under cfg.
Trait Implementations§
Source§impl Clone for SourceAcoustics
impl Clone for SourceAcoustics
impl Copy for SourceAcoustics
Source§impl Debug for SourceAcoustics
impl Debug for SourceAcoustics
Source§impl PartialEq for SourceAcoustics
impl PartialEq for SourceAcoustics
impl StructuralPartialEq for SourceAcoustics
Auto Trait Implementations§
impl Freeze for SourceAcoustics
impl RefUnwindSafe for SourceAcoustics
impl Send for SourceAcoustics
impl Sync for SourceAcoustics
impl Unpin for SourceAcoustics
impl UnsafeUnpin for SourceAcoustics
impl UnwindSafe for SourceAcoustics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more