mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
128 lines
4.1 KiB
C#
128 lines
4.1 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_CHORUS</c> effect (see <see cref="AlEffect"/>); requires <c>ALC_EXT_EFX</c>.
|
|
/// </summary>
|
|
public unsafe readonly partial struct ChorusEffect
|
|
{
|
|
/// <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 ChorusEffect(AlEffect effect) => Effect = effect;
|
|
|
|
/// <summary>
|
|
/// The wrapper converts freely to its underlying handle.
|
|
/// </summary>
|
|
public static implicit operator AlEffect(ChorusEffect 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.Chorus"/>.</exception>
|
|
public static explicit operator ChorusEffect(AlEffect effect) =>
|
|
effect.Type == AlEffectType.Chorus
|
|
? new ChorusEffect(effect)
|
|
: throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Chorus.");
|
|
|
|
/// <summary>
|
|
/// Deletes the underlying effect (<see cref="AlEffect.Delete"/>).
|
|
/// </summary>
|
|
public void Delete() => Effect.Delete();
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_CHORUS_WAVEFORM</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0 to 1; default 1.
|
|
/// </para>
|
|
/// </remarks>
|
|
public AlChorusWaveform Waveform
|
|
{
|
|
get => (AlChorusWaveform)Al.GetEffecti(Effect.Name, AL_CHORUS_WAVEFORM);
|
|
set => Al.PInvoke.Effecti(Effect.Name, AL_CHORUS_WAVEFORM, (int)value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_CHORUS_PHASE</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range -180 to 180; default 90.
|
|
/// </para>
|
|
/// </remarks>
|
|
public int Phase
|
|
{
|
|
get => Al.GetEffecti(Effect.Name, AL_CHORUS_PHASE);
|
|
set => Al.PInvoke.Effecti(Effect.Name, AL_CHORUS_PHASE, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_CHORUS_RATE</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 10.0f; default 1.1f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Rate
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_CHORUS_RATE);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_CHORUS_RATE, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_CHORUS_DEPTH</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 1.0f; default 0.1f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Depth
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_CHORUS_DEPTH);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_CHORUS_DEPTH, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_CHORUS_FEEDBACK</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range -1.0f to 1.0f; default 0.25f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Feedback
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_CHORUS_FEEDBACK);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_CHORUS_FEEDBACK, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_CHORUS_DELAY</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 0.016f; default 0.016f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Delay
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_CHORUS_DELAY);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_CHORUS_DELAY, value);
|
|
}
|
|
}
|
|
}
|