mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
SOURCE DUMP v1
This commit is contained in:
parent
bd62d51ec9
commit
fb20299e9d
1 changed files with 768360 additions and 0 deletions
|
|
@ -0,0 +1,55 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.OpenAl.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.OpenAlApi
|
||||
{
|
||||
/// <summary>
|
||||
/// An EFX effect object (an <c>ALuint</c> object name); requires <c>ALC_EXT_EFX</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Created by the typed <see cref="Efx"/> create methods (or <see cref="Efx.GenEffect"/>) and released by <see cref="Delete"/>. 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 cref="AlError.InvalidName"/> (see <see cref="Al.ThrowIfError"/>).
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public unsafe readonly partial struct AlEffect : 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 AlEffect(uint name) => Name = name;
|
||||
|
||||
/// <summary>
|
||||
/// The null effect (name <c>0</c>). Passing it to <see cref="AlAuxiliaryEffectSlot.Load"/> detaches the slot's effect.
|
||||
/// </summary>
|
||||
public static AlEffect Null
|
||||
{
|
||||
get => default;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns <see langword="true"/> if this is the null effect.
|
||||
/// </summary>
|
||||
public bool IsNull() => Name == 0;
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the effect (<c>alDeleteEffects</c>). It must not be attached to a slot.
|
||||
/// </summary>
|
||||
public void Delete()
|
||||
{
|
||||
var name = Name;
|
||||
Al.PInvoke.DeleteEffects(1, &name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns <see langword="true"/> if the name is a live effect (<c>alIsEffect</c>).
|
||||
/// </summary>
|
||||
public bool IsValid() => Al.PInvoke.IsEffect(Name);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue