// // 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_FLANGER effect (see ); requires ALC_EXT_EFX. /// public unsafe readonly partial struct FlangerEffect { /// /// The underlying effect handle. /// public readonly AlEffect Effect; /// /// Wraps an effect handle without validating its type; prefer the checked conversion. /// public FlangerEffect(AlEffect effect) => Effect = effect; /// /// The wrapper converts freely to its underlying handle. /// public static implicit operator AlEffect(FlangerEffect effect) => effect.Effect; /// /// Converts a raw handle to the typed wrapper, checking . /// /// /// The effect's type is not . public static explicit operator FlangerEffect(AlEffect effect) => effect.Type == AlEffectType.Flanger ? new FlangerEffect(effect) : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Flanger."); /// /// Deletes the underlying effect (). /// public void Delete() => Effect.Delete(); /// /// Gets/sets AL_FLANGER_WAVEFORM. /// /// /// /// range 0 to 1; default 1. /// /// public AlFlangerWaveform Waveform { get => (AlFlangerWaveform)Al.GetEffecti(Effect.Name, AL_FLANGER_WAVEFORM); set => Al.PInvoke.Effecti(Effect.Name, AL_FLANGER_WAVEFORM, (int)value); } /// /// Gets/sets AL_FLANGER_PHASE. /// /// /// /// range -180 to 180; default 0. /// /// public int Phase { get => Al.GetEffecti(Effect.Name, AL_FLANGER_PHASE); set => Al.PInvoke.Effecti(Effect.Name, AL_FLANGER_PHASE, value); } /// /// Gets/sets AL_FLANGER_RATE. /// /// /// /// range 0.0f to 10.0f; default 0.27f. /// /// public float Rate { get => Al.GetEffectf(Effect.Name, AL_FLANGER_RATE); set => Al.PInvoke.Effectf(Effect.Name, AL_FLANGER_RATE, value); } /// /// Gets/sets AL_FLANGER_DEPTH. /// /// /// /// range 0.0f to 1.0f; default 1.0f. /// /// public float Depth { get => Al.GetEffectf(Effect.Name, AL_FLANGER_DEPTH); set => Al.PInvoke.Effectf(Effect.Name, AL_FLANGER_DEPTH, value); } /// /// Gets/sets AL_FLANGER_FEEDBACK. /// /// /// /// range -1.0f to 1.0f; default -0.5f. /// /// public float Feedback { get => Al.GetEffectf(Effect.Name, AL_FLANGER_FEEDBACK); set => Al.PInvoke.Effectf(Effect.Name, AL_FLANGER_FEEDBACK, value); } /// /// Gets/sets AL_FLANGER_DELAY. /// /// /// /// range 0.0f to 0.004f; default 0.002f. /// /// public float Delay { get => Al.GetEffectf(Effect.Name, AL_FLANGER_DELAY); set => Al.PInvoke.Effectf(Effect.Name, AL_FLANGER_DELAY, value); } } }