// // 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_ECHO effect (see ); requires ALC_EXT_EFX. /// public unsafe readonly partial struct EchoEffect { /// /// The underlying effect handle. /// public readonly AlEffect Effect; /// /// Wraps an effect handle without validating its type; prefer the checked conversion. /// public EchoEffect(AlEffect effect) => Effect = effect; /// /// The wrapper converts freely to its underlying handle. /// public static implicit operator AlEffect(EchoEffect effect) => effect.Effect; /// /// Converts a raw handle to the typed wrapper, checking . /// /// The effect's type is not . public static explicit operator EchoEffect(AlEffect effect) => effect.Type == AlEffectType.Echo ? new EchoEffect(effect) : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Echo."); /// /// Deletes the underlying effect (). /// public void Delete() => Effect.Delete(); /// /// Gets/sets AL_ECHO_DELAY. /// /// /// /// range 0.0f to 0.207f; default 0.1f. /// /// public float Delay { get => Al.GetEffectf(Effect.Name, AL_ECHO_DELAY); set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_DELAY, value); } /// /// Gets/sets AL_ECHO_LRDELAY. /// /// /// /// range 0.0f to 0.404f; default 0.1f. /// /// public float LrDelay { get => Al.GetEffectf(Effect.Name, AL_ECHO_LRDELAY); set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_LRDELAY, value); } /// /// Gets/sets AL_ECHO_DAMPING. /// /// /// /// range 0.0f to 0.99f; default 0.5f. /// /// public float Damping { get => Al.GetEffectf(Effect.Name, AL_ECHO_DAMPING); set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_DAMPING, value); } /// /// Gets/sets AL_ECHO_FEEDBACK. /// /// /// /// range 0.0f to 1.0f; default 0.5f. /// /// public float Feedback { get => Al.GetEffectf(Effect.Name, AL_ECHO_FEEDBACK); set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_FEEDBACK, value); } /// /// Gets/sets AL_ECHO_SPREAD. /// /// /// /// range -1.0f to 1.0f; default -1.0f. /// /// public float Spread { get => Al.GetEffectf(Effect.Name, AL_ECHO_SPREAD); set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_SPREAD, value); } } }