pub trait ReadableParameter: Sized {
// Required methods
fn get_parameter(dsp: Dsp, index: c_int) -> Result<Self>;
fn get_parameter_string(dsp: Dsp, index: c_int) -> Result<Utf8CString>;
}
Expand description
Trait for types that can be read from DSP parameters.
You should either defer to Dsp::get_parameter
or call FMOD_DSP_GetParameterData
.
§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§
Sourcefn get_parameter(dsp: Dsp, index: c_int) -> Result<Self>
fn get_parameter(dsp: Dsp, index: c_int) -> Result<Self>
Get the parameter at index
.
Sourcefn get_parameter_string(dsp: Dsp, index: c_int) -> Result<Utf8CString>
fn get_parameter_string(dsp: Dsp, index: c_int) -> Result<Utf8CString>
Get the parameter string at index
.
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 ReadableParameter for bool
impl ReadableParameter for bool
fn get_parameter(dsp: Dsp, index: c_int) -> Result<Self>
fn get_parameter_string(dsp: Dsp, index: c_int) -> Result<Utf8CString>
Source§impl ReadableParameter for Box<ImpulseResponse>
impl ReadableParameter for Box<ImpulseResponse>
fn get_parameter(dsp: Dsp, index: c_int) -> Result<Self>
fn get_parameter_string(dsp: Dsp, index: c_int) -> Result<Utf8CString>
Source§impl ReadableParameter for c_float
impl ReadableParameter for c_float
fn get_parameter(dsp: Dsp, index: c_int) -> Result<Self>
fn get_parameter_string(dsp: Dsp, index: c_int) -> Result<Utf8CString>
Source§impl ReadableParameter for c_int
impl ReadableParameter for c_int
fn get_parameter(dsp: Dsp, index: c_int) -> Result<Self>
fn get_parameter_string(dsp: Dsp, index: c_int) -> Result<Utf8CString>
Implementors§
impl ReadableParameter for Output
impl ReadableParameter for DelayType
impl ReadableParameter for DownmixType
impl ReadableParameter for WindowType
impl ReadableParameter for CurrentState
impl ReadableParameter for fmod::effects::multiband_dynamics::ModeType
fmod_2_3
only.impl ReadableParameter for FilterType
impl ReadableParameter for OscillatorType
impl ReadableParameter for StereoModeType
impl ReadableParameter for ExtentModeType
impl ReadableParameter for RolloffType
impl ReadableParameter for fmod::effects::pan::ModeType
impl ReadableParameter for CrossoverSlopeType
impl ReadableParameter for fmod::effects::transceiver::SpeakerMode
impl ReadableParameter for fmod::SpeakerMode
impl ReadableParameter for InfoData
impl ReadableParameter for WeightingData
impl ReadableParameter for AttenuationRange
impl ReadableParameter for Attributes3DMulti
impl ReadableParameter for DspAttributes3D
impl ReadableParameter for DynamicResponse
fmod_2_3
only.