mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
113 lines
3.7 KiB
C#
113 lines
3.7 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.OpenAl.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
using static Brutal.OpenAlApi.Al.Constants;
|
|
|
|
namespace Brutal.OpenAlApi
|
|
{
|
|
/// <summary>
|
|
/// The typed parameter surface of an <c>AL_EFFECT_ECHO</c> effect (see <see cref="AlEffect"/>); requires <c>ALC_EXT_EFX</c>.
|
|
/// </summary>
|
|
public unsafe readonly partial struct EchoEffect
|
|
{
|
|
/// <summary>
|
|
/// The underlying effect handle.
|
|
/// </summary>
|
|
public readonly AlEffect Effect;
|
|
|
|
/// <summary>
|
|
/// Wraps an effect handle without validating its type; prefer the checked conversion.
|
|
/// </summary>
|
|
public EchoEffect(AlEffect effect) => Effect = effect;
|
|
|
|
/// <summary>
|
|
/// The wrapper converts freely to its underlying handle.
|
|
/// </summary>
|
|
public static implicit operator AlEffect(EchoEffect effect) => effect.Effect;
|
|
|
|
/// <summary>
|
|
/// Converts a raw handle to the typed wrapper, checking <see cref="AlEffect.Type"/>.
|
|
/// </summary>
|
|
/// <exception cref="InvalidCastException">The effect's type is not <see cref="AlEffectType.Echo"/>.</exception>
|
|
public static explicit operator EchoEffect(AlEffect effect) =>
|
|
effect.Type == AlEffectType.Echo
|
|
? new EchoEffect(effect)
|
|
: throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Echo.");
|
|
|
|
/// <summary>
|
|
/// Deletes the underlying effect (<see cref="AlEffect.Delete"/>).
|
|
/// </summary>
|
|
public void Delete() => Effect.Delete();
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_ECHO_DELAY</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 0.207f; default 0.1f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Delay
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_ECHO_DELAY);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_DELAY, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_ECHO_LRDELAY</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 0.404f; default 0.1f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float LrDelay
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_ECHO_LRDELAY);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_LRDELAY, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_ECHO_DAMPING</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 0.99f; default 0.5f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Damping
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_ECHO_DAMPING);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_DAMPING, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_ECHO_FEEDBACK</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 1.0f; default 0.5f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Feedback
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_ECHO_FEEDBACK);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_FEEDBACK, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_ECHO_SPREAD</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range -1.0f to 1.0f; default -1.0f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Spread
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_ECHO_SPREAD);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_SPREAD, value);
|
|
}
|
|
}
|
|
}
|