mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
55 lines
2.1 KiB
C#
55 lines
2.1 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.OpenAl.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.OpenAlApi
|
|
{
|
|
/// <summary>
|
|
/// An EFX auxiliary effect slot object (an <c>ALuint</c> object name); requires <c>ALC_EXT_EFX</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Created by <see cref="Efx.CreateAuxiliaryEffectSlot"/> (or <see cref="Efx.GenAuxiliaryEffectSlot"/>) and released by <see cref="Delete"/>. 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 cref="AlError.InvalidName"/> (see <see cref="Al.ThrowIfError"/>). A slot holds per-context state (the loaded effect and its gain/send settings).
|
|
/// </para>
|
|
/// </remarks>
|
|
public unsafe readonly partial struct AlAuxiliaryEffectSlot : INullable
|
|
{
|
|
/// <summary>
|
|
/// The raw OpenAL object name.
|
|
/// </summary>
|
|
public readonly uint Name;
|
|
|
|
/// <summary>
|
|
/// Wraps an existing object name without validating it.
|
|
/// </summary>
|
|
/// <param name="name">The raw OpenAL object name.</param>
|
|
public AlAuxiliaryEffectSlot(uint name) => Name = name;
|
|
|
|
/// <summary>
|
|
/// The null auxiliary effect slot (name <c>0</c>).
|
|
/// </summary>
|
|
public static AlAuxiliaryEffectSlot Null
|
|
{
|
|
get => default;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns <see langword="true"/> if this is the null auxiliary effect slot.
|
|
/// </summary>
|
|
public bool IsNull() => Name == 0;
|
|
|
|
/// <summary>
|
|
/// Deletes the auxiliary effect slot (<c>alDeleteAuxiliaryEffectSlots</c>). Its effect must be detached first.
|
|
/// </summary>
|
|
public void Delete()
|
|
{
|
|
var name = Name;
|
|
Al.PInvoke.DeleteAuxiliaryEffectSlots(1, &name);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns <see langword="true"/> if the name is a live auxiliary effect slot (<c>alIsAuxiliaryEffectSlot</c>).
|
|
/// </summary>
|
|
public bool IsValid() => Al.PInvoke.IsAuxiliaryEffectSlot(Name);
|
|
}
|
|
}
|