mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
167 lines
6.6 KiB
C#
167 lines
6.6 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.OpenAl.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.OpenAlApi
|
|
{
|
|
public sealed unsafe partial class Efx
|
|
{
|
|
/// <summary>
|
|
/// Generates auxiliary effect slots (<c>alGenAuxiliaryEffectSlots</c>), filling <paramref name="auxiliaryEffectSlots"/>.
|
|
/// </summary>
|
|
/// <param name="auxiliaryEffectSlots">The span to fill; its length determines how many auxiliary effect
|
|
/// slots are generated.</param>
|
|
public void GenAuxiliaryEffectSlots(Span<AlAuxiliaryEffectSlot> auxiliaryEffectSlots)
|
|
{
|
|
Device.ThrowIfDisposed();
|
|
if (auxiliaryEffectSlots.IsEmpty)
|
|
return;
|
|
var names = auxiliaryEffectSlots.Cast<AlAuxiliaryEffectSlot, uint>();
|
|
fixed (uint* p = names)
|
|
Al.PInvoke.GenAuxiliaryEffectSlots(names.Length, p);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Generates auxiliary effect slots (<c>alGenAuxiliaryEffectSlots</c>). Allocates the returned array; use the <c>Span</c> overload to bring your own storage.
|
|
/// </summary>
|
|
/// <param name="count">How many auxiliary effect slots to generate; a non-positive count returns an
|
|
/// empty array.</param>
|
|
public AlAuxiliaryEffectSlot[] GenAuxiliaryEffectSlots(int count)
|
|
{
|
|
Device.ThrowIfDisposed();
|
|
if (count <= 0)
|
|
return [];
|
|
var auxiliaryEffectSlots = new AlAuxiliaryEffectSlot[count];
|
|
GenAuxiliaryEffectSlots(auxiliaryEffectSlots.AsSpan());
|
|
return auxiliaryEffectSlots;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Generates a single auxiliary effect slot.
|
|
/// </summary>
|
|
public AlAuxiliaryEffectSlot GenAuxiliaryEffectSlot()
|
|
{
|
|
Span<AlAuxiliaryEffectSlot> auxiliaryEffectSlot = stackalloc AlAuxiliaryEffectSlot[1];
|
|
GenAuxiliaryEffectSlots(auxiliaryEffectSlot);
|
|
return auxiliaryEffectSlot[0];
|
|
}
|
|
|
|
/// <summary>
|
|
/// Deletes the given auxiliary effect slots (<c>alDeleteAuxiliaryEffectSlots</c>). Each slot's effect must be detached first.
|
|
/// </summary>
|
|
/// <param name="auxiliaryEffectSlots">The auxiliary effect slots to delete.</param>
|
|
public void DeleteAuxiliaryEffectSlots(ReadOnlySpan<AlAuxiliaryEffectSlot> auxiliaryEffectSlots)
|
|
{
|
|
Device.ThrowIfDisposed();
|
|
if (auxiliaryEffectSlots.IsEmpty)
|
|
return;
|
|
var names = auxiliaryEffectSlots.Cast<AlAuxiliaryEffectSlot, uint>();
|
|
fixed (uint* p = names)
|
|
Al.PInvoke.DeleteAuxiliaryEffectSlots(names.Length, p);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Generates untyped effects (<c>alGenEffects</c>), filling <paramref name="effects"/>.
|
|
/// </summary>
|
|
/// <param name="effects">The span to fill; its length determines how many effects are generated.</param>
|
|
public void GenEffects(Span<AlEffect> effects)
|
|
{
|
|
Device.ThrowIfDisposed();
|
|
if (effects.IsEmpty)
|
|
return;
|
|
var names = effects.Cast<AlEffect, uint>();
|
|
fixed (uint* p = names)
|
|
Al.PInvoke.GenEffects(names.Length, p);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Generates untyped effects (<c>alGenEffects</c>). Allocates the returned array; use the <c>Span</c> overload to bring your own storage.
|
|
/// </summary>
|
|
/// <param name="count">How many effects to generate; a non-positive count returns an empty array.</param>
|
|
public AlEffect[] GenEffects(int count)
|
|
{
|
|
Device.ThrowIfDisposed();
|
|
if (count <= 0)
|
|
return [];
|
|
var effects = new AlEffect[count];
|
|
GenEffects(effects.AsSpan());
|
|
return effects;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Generates a single untyped effect.
|
|
/// </summary>
|
|
public AlEffect GenEffect()
|
|
{
|
|
Span<AlEffect> effect = stackalloc AlEffect[1];
|
|
GenEffects(effect);
|
|
return effect[0];
|
|
}
|
|
|
|
/// <summary>
|
|
/// Deletes the given effects (<c>alDeleteEffects</c>). Each must not be attached to a slot.
|
|
/// </summary>
|
|
/// <param name="effects">The effects to delete.</param>
|
|
public void DeleteEffects(ReadOnlySpan<AlEffect> effects)
|
|
{
|
|
Device.ThrowIfDisposed();
|
|
if (effects.IsEmpty)
|
|
return;
|
|
var names = effects.Cast<AlEffect, uint>();
|
|
fixed (uint* p = names)
|
|
Al.PInvoke.DeleteEffects(names.Length, p);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Generates untyped filters (<c>alGenFilters</c>), filling <paramref name="filters"/>.
|
|
/// </summary>
|
|
/// <param name="filters">The span to fill; its length determines how many filters are generated.</param>
|
|
public void GenFilters(Span<AlFilter> filters)
|
|
{
|
|
Device.ThrowIfDisposed();
|
|
if (filters.IsEmpty)
|
|
return;
|
|
var names = filters.Cast<AlFilter, uint>();
|
|
fixed (uint* p = names)
|
|
Al.PInvoke.GenFilters(names.Length, p);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Generates untyped filters (<c>alGenFilters</c>). Allocates the returned array; use the <c>Span</c> overload to bring your own storage.
|
|
/// </summary>
|
|
/// <param name="count">How many filters to generate; a non-positive count returns an empty array.</param>
|
|
public AlFilter[] GenFilters(int count)
|
|
{
|
|
Device.ThrowIfDisposed();
|
|
if (count <= 0)
|
|
return [];
|
|
var filters = new AlFilter[count];
|
|
GenFilters(filters.AsSpan());
|
|
return filters;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Generates a single untyped filter.
|
|
/// </summary>
|
|
public AlFilter GenFilter()
|
|
{
|
|
Span<AlFilter> filter = stackalloc AlFilter[1];
|
|
GenFilters(filter);
|
|
return filter[0];
|
|
}
|
|
|
|
/// <summary>
|
|
/// Deletes the given filters (<c>alDeleteFilters</c>). Each must not be attached to a source or send.
|
|
/// </summary>
|
|
/// <param name="filters">The filters to delete.</param>
|
|
public void DeleteFilters(ReadOnlySpan<AlFilter> filters)
|
|
{
|
|
Device.ThrowIfDisposed();
|
|
if (filters.IsEmpty)
|
|
return;
|
|
var names = filters.Cast<AlFilter, uint>();
|
|
fixed (uint* p = names)
|
|
Al.PInvoke.DeleteFilters(names.Length, p);
|
|
}
|
|
}
|
|
}
|