// // Generated by Brutal.OpenAl.Generate; do not edit by hand. #nullable enable using static Brutal.OpenAlApi.Al.Constants; namespace Brutal.OpenAlApi { /// /// The typed parameter surface of an AL_EFFECT_DISTORTION effect (see ); requires ALC_EXT_EFX. /// public unsafe readonly partial struct DistortionEffect { /// /// The underlying effect handle. /// public readonly AlEffect Effect; /// /// Wraps an effect handle without validating its type; prefer the checked conversion. /// public DistortionEffect(AlEffect effect) => Effect = effect; /// /// The wrapper converts freely to its underlying handle. /// public static implicit operator AlEffect(DistortionEffect effect) => effect.Effect; /// /// Converts a raw handle to the typed wrapper, checking . /// /// /// The effect's type is not . public static explicit operator DistortionEffect(AlEffect effect) => effect.Type == AlEffectType.Distortion ? new DistortionEffect(effect) : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Distortion."); /// /// Deletes the underlying effect (). /// public void Delete() => Effect.Delete(); /// /// Gets/sets AL_DISTORTION_EDGE. /// /// /// /// range 0.0f to 1.0f; default 0.2f. /// /// public float Edge { get => Al.GetEffectf(Effect.Name, AL_DISTORTION_EDGE); set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_EDGE, value); } /// /// Gets/sets AL_DISTORTION_GAIN. /// /// /// /// range 0.01f to 1.0f; default 0.05f. /// /// public float Gain { get => Al.GetEffectf(Effect.Name, AL_DISTORTION_GAIN); set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_GAIN, value); } /// /// Gets/sets AL_DISTORTION_LOWPASS_CUTOFF. /// /// /// /// range 80.0f to 24000.0f; default 8000.0f. /// /// public float LowpassCutoff { get => Al.GetEffectf(Effect.Name, AL_DISTORTION_LOWPASS_CUTOFF); set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_LOWPASS_CUTOFF, value); } /// /// Gets/sets AL_DISTORTION_EQCENTER. /// /// /// /// range 80.0f to 24000.0f; default 3600.0f. /// /// public float EqCenter { get => Al.GetEffectf(Effect.Name, AL_DISTORTION_EQCENTER); set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_EQCENTER, value); } /// /// Gets/sets AL_DISTORTION_EQBANDWIDTH. /// /// /// /// range 80.0f to 24000.0f; default 3600.0f. /// /// public float EqBandwidth { get => Al.GetEffectf(Effect.Name, AL_DISTORTION_EQBANDWIDTH); set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_EQBANDWIDTH, value); } } }