pub trait WritableParameter: Sized {
// Required method
fn set_parameter(self, dsp: Dsp, index: c_int) -> Result<()>;
}
Expand description
Trait for types that can be written to DSP parameters.
You should either defer to Dsp::set_parameter
or call FMOD_DSP_SetParameterData
.
§Data types
Implementing this trait for anything aside from data types is relatively trivial.
If you are implementing this for a data type, you must validate that the parameter type at index
matches what you expect it to be.
You can usually do this by getting the raw parameter info and checking that the FMOD_DSP_PARAMETER_DATA_TYPE
field matches what you expect.
There are hidden methods on Dsp
that can help you write correct implementations for Sized
types.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl WritableParameter for bool
impl WritableParameter for bool
Source§impl WritableParameter for c_float
impl WritableParameter for c_float
Source§impl WritableParameter for c_int
impl WritableParameter for c_int
Implementors§
impl WritableParameter for &ImpulseResponse
impl WritableParameter for Output
impl WritableParameter for DelayType
impl WritableParameter for DownmixType
impl WritableParameter for WindowType
impl WritableParameter for CurrentState
impl WritableParameter for fmod::effects::multiband_dynamics::ModeType
Available on
fmod_2_3
only.