#[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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.