//
// Generated by Brutal.OpenAl.Generate; do not edit by hand.
#nullable enable
namespace Brutal.OpenAlApi
{
///
/// An EFX auxiliary effect slot object (an ALuint object name); requires ALC_EXT_EFX.
///
///
///
/// Created by (or ) and released by . This is a plain name, not a resource handle: copies refer to the same auxiliary effect slot; delete it exactly once. Operating on a null or deleted name sets (see ). A slot holds per-context state (the loaded effect and its gain/send settings).
///
///
public unsafe readonly partial struct AlAuxiliaryEffectSlot : INullable
{
///
/// The raw OpenAL object name.
///
public readonly uint Name;
///
/// Wraps an existing object name without validating it.
///
/// The raw OpenAL object name.
public AlAuxiliaryEffectSlot(uint name) => Name = name;
///
/// The null auxiliary effect slot (name 0).
///
public static AlAuxiliaryEffectSlot Null
{
get => default;
}
///
/// Returns if this is the null auxiliary effect slot.
///
public bool IsNull() => Name == 0;
///
/// Deletes the auxiliary effect slot (alDeleteAuxiliaryEffectSlots). Its effect must be detached first.
///
public void Delete()
{
var name = Name;
Al.PInvoke.DeleteAuxiliaryEffectSlots(1, &name);
}
///
/// Returns if the name is a live auxiliary effect slot (alIsAuxiliaryEffectSlot).
///
public bool IsValid() => Al.PInvoke.IsAuxiliaryEffectSlot(Name);
}
}