// // 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_PITCH_SHIFTER effect (see ); requires ALC_EXT_EFX. /// public unsafe readonly partial struct PitchShifterEffect { /// /// The underlying effect handle. /// public readonly AlEffect Effect; /// /// Wraps an effect handle without validating its type; prefer the checked conversion. /// public PitchShifterEffect(AlEffect effect) => Effect = effect; /// /// The wrapper converts freely to its underlying handle. /// public static implicit operator AlEffect(PitchShifterEffect effect) => effect.Effect; /// /// Converts a raw handle to the typed wrapper, checking . /// /// /// The effect's type is not . public static explicit operator PitchShifterEffect(AlEffect effect) => effect.Type == AlEffectType.PitchShifter ? new PitchShifterEffect(effect) : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not PitchShifter."); /// /// Deletes the underlying effect (). /// public void Delete() => Effect.Delete(); /// /// Gets/sets AL_PITCH_SHIFTER_COARSE_TUNE. /// /// /// /// range -12 to 12; default 12. /// /// public int CoarseTune { get => Al.GetEffecti(Effect.Name, AL_PITCH_SHIFTER_COARSE_TUNE); set => Al.PInvoke.Effecti(Effect.Name, AL_PITCH_SHIFTER_COARSE_TUNE, value); } /// /// Gets/sets AL_PITCH_SHIFTER_FINE_TUNE. /// /// /// /// range -50 to 50; default 0. /// /// public int FineTune { get => Al.GetEffecti(Effect.Name, AL_PITCH_SHIFTER_FINE_TUNE); set => Al.PInvoke.Effecti(Effect.Name, AL_PITCH_SHIFTER_FINE_TUNE, value); } } }