// // Generated by Brutal.OpenAl.Generate; do not edit by hand. #nullable enable namespace Brutal.OpenAlApi { /// /// An EFX effect object (an ALuint object name); requires ALC_EXT_EFX. /// /// /// /// Created by the typed create methods (or ) and released by . This is a plain name, not a resource handle: copies refer to the same effect; delete it exactly once. Operating on a null or deleted name sets (see ). /// /// public unsafe readonly partial struct AlEffect : INullable { /// /// The raw OpenAL object name. /// public readonly uint Name; /// /// Wraps an existing object name without validating it. /// /// The raw OpenAL object name. public AlEffect(uint name) => Name = name; /// /// The null effect (name 0). Passing it to detaches the slot's effect. /// public static AlEffect Null { get => default; } /// /// Returns if this is the null effect. /// public bool IsNull() => Name == 0; /// /// Deletes the effect (alDeleteEffects). It must not be attached to a slot. /// public void Delete() { var name = Name; Al.PInvoke.DeleteEffects(1, &name); } /// /// Returns if the name is a live effect (alIsEffect). /// public bool IsValid() => Al.PInvoke.IsEffect(Name); } }