mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
100 lines
3.4 KiB
C#
100 lines
3.4 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_AUTOWAH</c> effect (see <see cref="AlEffect"/>); requires <c>ALC_EXT_EFX</c>.
|
|
/// </summary>
|
|
public unsafe readonly partial struct AutowahEffect
|
|
{
|
|
/// <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 AutowahEffect(AlEffect effect) => Effect = effect;
|
|
|
|
/// <summary>
|
|
/// The wrapper converts freely to its underlying handle.
|
|
/// </summary>
|
|
public static implicit operator AlEffect(AutowahEffect 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.Autowah"/>.</exception>
|
|
public static explicit operator AutowahEffect(AlEffect effect) =>
|
|
effect.Type == AlEffectType.Autowah
|
|
? new AutowahEffect(effect)
|
|
: throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Autowah.");
|
|
|
|
/// <summary>
|
|
/// Deletes the underlying effect (<see cref="AlEffect.Delete"/>).
|
|
/// </summary>
|
|
public void Delete() => Effect.Delete();
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_AUTOWAH_ATTACK_TIME</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0001f to 1.0f; default 0.06f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float AttackTime
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_AUTOWAH_ATTACK_TIME);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_AUTOWAH_ATTACK_TIME, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_AUTOWAH_RELEASE_TIME</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0001f to 1.0f; default 0.06f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float ReleaseTime
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_AUTOWAH_RELEASE_TIME);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_AUTOWAH_RELEASE_TIME, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_AUTOWAH_RESONANCE</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 2.0f to 1000.0f; default 1000.0f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Resonance
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_AUTOWAH_RESONANCE);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_AUTOWAH_RESONANCE, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_AUTOWAH_PEAK_GAIN</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.00003f to 31621.0f; default 11.22f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float PeakGain
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_AUTOWAH_PEAK_GAIN);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_AUTOWAH_PEAK_GAIN, value);
|
|
}
|
|
}
|
|
}
|