#[repr(C)]pub struct AudioUnitParameterInfo {
pub name: [c_char; 52],
pub unitName: *const CFString,
pub clumpID: u32,
pub cfNameString: *const CFString,
pub unit: AudioUnitParameterUnit,
pub minValue: AudioUnitParameterValue,
pub maxValue: AudioUnitParameterValue,
pub defaultValue: AudioUnitParameterValue,
pub flags: AudioUnitParameterOptions,
}
AUComponent
and AudioUnitProperties
and objc2-core-foundation
only.Expand description
UNUSED - set to zero - UTF8 encoded C string (originally).
Only valid if the unit field equals kAudioUnitParameterUnit_CustomUnit, in which case, unitName must contain a valid CFStringRef. As with cfNameString, if (flags & kAudioUnitParameterFlag_CFNameRelease) is non-zero, the AudioUnit must return a +1 reference to this string, and the host must release it.
Only valid if kAudioUnitParameterFlag_HasClump is set.
Only valid if kAudioUnitParameterFlag_HasCFNameString is set.
If the “unit” field contains a value not in the enum above, then assume kAudioUnitParameterUnit_Generic
The parameter’s minimum value.
The parameter’s maximum value.
The parameter’s default value.
Due to some vagaries about the ways in which Parameter’s CFNames have been described, it was necessary to add a flag: kAudioUnitParameterFlag_CFNameRelease. In normal usage a parameter name is essentially a static object, but sometimes an audio unit will generate parameter names dynamically.. As these are expected to be CFStrings, in that case the host should release those names when it is finished with them, but there was no way to communicate this distinction in behavior. Thus, if an audio unit will (or could) generate a name dynamically, it should set this flag in the parameter’s info. The host should check for this flag, and if present, release the parameter name when it is finished with it.
See also Apple’s documentation
Fields§
§name: [c_char; 52]
§unitName: *const CFString
§clumpID: u32
§cfNameString: *const CFString
§unit: AudioUnitParameterUnit
§minValue: AudioUnitParameterValue
§maxValue: AudioUnitParameterValue
§defaultValue: AudioUnitParameterValue
§flags: AudioUnitParameterOptions
Trait Implementations§
Source§impl Clone for AudioUnitParameterInfo
impl Clone for AudioUnitParameterInfo
Source§fn clone(&self) -> AudioUnitParameterInfo
fn clone(&self) -> AudioUnitParameterInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more