// // 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_CHORUS effect (see ); requires ALC_EXT_EFX. /// public unsafe readonly partial struct ChorusEffect { /// /// The underlying effect handle. /// public readonly AlEffect Effect; /// /// Wraps an effect handle without validating its type; prefer the checked conversion. /// public ChorusEffect(AlEffect effect) => Effect = effect; /// /// The wrapper converts freely to its underlying handle. /// public static implicit operator AlEffect(ChorusEffect effect) => effect.Effect; /// /// Converts a raw handle to the typed wrapper, checking . /// /// /// The effect's type is not . public static explicit operator ChorusEffect(AlEffect effect) => effect.Type == AlEffectType.Chorus ? new ChorusEffect(effect) : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Chorus."); /// /// Deletes the underlying effect (). /// public void Delete() => Effect.Delete(); /// /// Gets/sets AL_CHORUS_WAVEFORM. /// /// /// /// range 0 to 1; default 1. /// /// public AlChorusWaveform Waveform { get => (AlChorusWaveform)Al.GetEffecti(Effect.Name, AL_CHORUS_WAVEFORM); set => Al.PInvoke.Effecti(Effect.Name, AL_CHORUS_WAVEFORM, (int)value); } /// /// Gets/sets AL_CHORUS_PHASE. /// /// /// /// range -180 to 180; default 90. /// /// public int Phase { get => Al.GetEffecti(Effect.Name, AL_CHORUS_PHASE); set => Al.PInvoke.Effecti(Effect.Name, AL_CHORUS_PHASE, value); } /// /// Gets/sets AL_CHORUS_RATE. /// /// /// /// range 0.0f to 10.0f; default 1.1f. /// /// public float Rate { get => Al.GetEffectf(Effect.Name, AL_CHORUS_RATE); set => Al.PInvoke.Effectf(Effect.Name, AL_CHORUS_RATE, value); } /// /// Gets/sets AL_CHORUS_DEPTH. /// /// /// /// range 0.0f to 1.0f; default 0.1f. /// /// public float Depth { get => Al.GetEffectf(Effect.Name, AL_CHORUS_DEPTH); set => Al.PInvoke.Effectf(Effect.Name, AL_CHORUS_DEPTH, value); } /// /// Gets/sets AL_CHORUS_FEEDBACK. /// /// /// /// range -1.0f to 1.0f; default 0.25f. /// /// public float Feedback { get => Al.GetEffectf(Effect.Name, AL_CHORUS_FEEDBACK); set => Al.PInvoke.Effectf(Effect.Name, AL_CHORUS_FEEDBACK, value); } /// /// Gets/sets AL_CHORUS_DELAY. /// /// /// /// range 0.0f to 0.016f; default 0.016f. /// /// public float Delay { get => Al.GetEffectf(Effect.Name, AL_CHORUS_DELAY); set => Al.PInvoke.Effectf(Effect.Name, AL_CHORUS_DELAY, value); } } }