Struct steam_audio_sys::ffi::IPLDistanceAttenuationModel
source · [−]#[repr(C)]pub struct IPLDistanceAttenuationModel {
pub type_: IPLDistanceAttenuationModelType,
pub minDistance: IPLfloat32,
pub callback: IPLDistanceAttenuationCallback,
pub userData: *mut c_void,
pub dirty: IPLbool,
}
Expand description
A distance attenuation model that can be used for modeling attenuation of sound over distance. Can be used with both direct and indirect sound propagation.
Fields
type_: IPLDistanceAttenuationModelType
The type of distance attenuation model to use.
minDistance: IPLfloat32
When \c type is \c IPL_DISTANCEATTENUATIONTYPE_INVERSEDISTANCE, no distance attenuation is applied to any sound whose distance from the listener is less than this value.
callback: IPLDistanceAttenuationCallback
When \c type is \c IPL_DISTANCEATTENUATIONTYPE_CALLBACK, this function will be called whenever Steam Audio needs to evaluate distance attenuation.
userData: *mut c_void
Pointer to arbitrary data that will be provided to the \c callback function whenever it is called. May be \c NULL.
dirty: IPLbool
Set to \c IPL_TRUE to indicate that the distance attenuation model defined by the \c callback function has changed since the last time simulation was run. For example, the callback may be evaluating a curve defined in a GUI. If the user is editing the curve in real-time, set this to \c IPL_TRUE whenever the curve changes, so Steam Audio can update simulation results to match.
Trait Implementations
sourceimpl Clone for IPLDistanceAttenuationModel
impl Clone for IPLDistanceAttenuationModel
sourcefn clone(&self) -> IPLDistanceAttenuationModel
fn clone(&self) -> IPLDistanceAttenuationModel
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for IPLDistanceAttenuationModel
impl Debug for IPLDistanceAttenuationModel
impl Copy for IPLDistanceAttenuationModel
Auto Trait Implementations
impl RefUnwindSafe for IPLDistanceAttenuationModel
impl !Send for IPLDistanceAttenuationModel
impl !Sync for IPLDistanceAttenuationModel
impl Unpin for IPLDistanceAttenuationModel
impl UnwindSafe for IPLDistanceAttenuationModel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more