mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
128 lines
4.2 KiB
C#
128 lines
4.2 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_FLANGER</c> effect (see <see cref="AlEffect"/>); requires <c>ALC_EXT_EFX</c>.
|
|
/// </summary>
|
|
public unsafe readonly partial struct FlangerEffect
|
|
{
|
|
/// <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 FlangerEffect(AlEffect effect) => Effect = effect;
|
|
|
|
/// <summary>
|
|
/// The wrapper converts freely to its underlying handle.
|
|
/// </summary>
|
|
public static implicit operator AlEffect(FlangerEffect 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.Flanger"/>.</exception>
|
|
public static explicit operator FlangerEffect(AlEffect effect) =>
|
|
effect.Type == AlEffectType.Flanger
|
|
? new FlangerEffect(effect)
|
|
: throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Flanger.");
|
|
|
|
/// <summary>
|
|
/// Deletes the underlying effect (<see cref="AlEffect.Delete"/>).
|
|
/// </summary>
|
|
public void Delete() => Effect.Delete();
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_FLANGER_WAVEFORM</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0 to 1; default 1.
|
|
/// </para>
|
|
/// </remarks>
|
|
public AlFlangerWaveform Waveform
|
|
{
|
|
get => (AlFlangerWaveform)Al.GetEffecti(Effect.Name, AL_FLANGER_WAVEFORM);
|
|
set => Al.PInvoke.Effecti(Effect.Name, AL_FLANGER_WAVEFORM, (int)value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_FLANGER_PHASE</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range -180 to 180; default 0.
|
|
/// </para>
|
|
/// </remarks>
|
|
public int Phase
|
|
{
|
|
get => Al.GetEffecti(Effect.Name, AL_FLANGER_PHASE);
|
|
set => Al.PInvoke.Effecti(Effect.Name, AL_FLANGER_PHASE, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_FLANGER_RATE</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 10.0f; default 0.27f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Rate
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_FLANGER_RATE);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_FLANGER_RATE, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_FLANGER_DEPTH</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 1.0f; default 1.0f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Depth
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_FLANGER_DEPTH);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_FLANGER_DEPTH, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_FLANGER_FEEDBACK</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range -1.0f to 1.0f; default -0.5f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Feedback
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_FLANGER_FEEDBACK);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_FLANGER_FEEDBACK, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_FLANGER_DELAY</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 0.004f; default 0.002f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Delay
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_FLANGER_DELAY);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_FLANGER_DELAY, value);
|
|
}
|
|
}
|
|
}
|