mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
396 lines
14 KiB
C#
396 lines
14 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_EAXREVERB</c> effect (see <see cref="AlEffect"/>); requires <c>ALC_EXT_EFX</c>.
|
|
/// </summary>
|
|
public unsafe readonly partial struct EaxReverbEffect
|
|
{
|
|
/// <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 EaxReverbEffect(AlEffect effect) => Effect = effect;
|
|
|
|
/// <summary>
|
|
/// The wrapper converts freely to its underlying handle.
|
|
/// </summary>
|
|
public static implicit operator AlEffect(EaxReverbEffect 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.EaxReverb"/>.</exception>
|
|
public static explicit operator EaxReverbEffect(AlEffect effect) =>
|
|
effect.Type == AlEffectType.EaxReverb
|
|
? new EaxReverbEffect(effect)
|
|
: throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not EaxReverb.");
|
|
|
|
/// <summary>
|
|
/// Deletes the underlying effect (<see cref="AlEffect.Delete"/>).
|
|
/// </summary>
|
|
public void Delete() => Effect.Delete();
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_DENSITY</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 1.0f; default 1.0f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Density
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_DENSITY);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DENSITY, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_DIFFUSION</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 1.0f; default 1.0f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Diffusion
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_DIFFUSION);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DIFFUSION, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_GAIN</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 1.0f; default 0.32f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float Gain
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_GAIN);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_GAIN, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_GAINHF</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 1.0f; default 0.89f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GainHf
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_GAINHF);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_GAINHF, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_GAINLF</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 1.0f; default 1.0f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GainLf
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_GAINLF);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_GAINLF, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_DECAY_TIME</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.1f to 20.0f; default 1.49f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float DecayTime
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_DECAY_TIME);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DECAY_TIME, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_DECAY_HFRATIO</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.1f to 2.0f; default 0.83f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float DecayHfRatio
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_DECAY_HFRATIO);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DECAY_HFRATIO, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_DECAY_LFRATIO</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.1f to 2.0f; default 1.0f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float DecayLfRatio
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_DECAY_LFRATIO);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DECAY_LFRATIO, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_REFLECTIONS_GAIN</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 3.16f; default 0.05f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float ReflectionsGain
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_REFLECTIONS_GAIN);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_REFLECTIONS_GAIN, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_REFLECTIONS_DELAY</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 0.3f; default 0.007f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float ReflectionsDelay
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_REFLECTIONS_DELAY);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_REFLECTIONS_DELAY, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_REFLECTIONS_PAN</c> (a 3-component vector).
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// default 0.0f per axis.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 ReflectionsPan
|
|
{
|
|
get => Al.GetEffectfv3(Effect.Name, AL_EAXREVERB_REFLECTIONS_PAN);
|
|
set => Al.SetEffectfv3(Effect.Name, AL_EAXREVERB_REFLECTIONS_PAN, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_LATE_REVERB_GAIN</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 10.0f; default 1.26f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float LateReverbGain
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_LATE_REVERB_GAIN);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_LATE_REVERB_GAIN, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_LATE_REVERB_DELAY</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 0.1f; default 0.011f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float LateReverbDelay
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_LATE_REVERB_DELAY);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_LATE_REVERB_DELAY, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_LATE_REVERB_PAN</c> (a 3-component vector).
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// default 0.0f per axis.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 LateReverbPan
|
|
{
|
|
get => Al.GetEffectfv3(Effect.Name, AL_EAXREVERB_LATE_REVERB_PAN);
|
|
set => Al.SetEffectfv3(Effect.Name, AL_EAXREVERB_LATE_REVERB_PAN, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_ECHO_TIME</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.075f to 0.25f; default 0.25f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float EchoTime
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_ECHO_TIME);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_ECHO_TIME, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_ECHO_DEPTH</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 1.0f; default 0.0f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float EchoDepth
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_ECHO_DEPTH);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_ECHO_DEPTH, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_MODULATION_TIME</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.04f to 4.0f; default 0.25f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float ModulationTime
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_MODULATION_TIME);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_MODULATION_TIME, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_MODULATION_DEPTH</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 1.0f; default 0.0f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float ModulationDepth
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_MODULATION_DEPTH);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_MODULATION_DEPTH, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_AIR_ABSORPTION_GAINHF</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.892f to 1.0f; default 0.994f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float AirAbsorptionGainHf
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_AIR_ABSORPTION_GAINHF);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_AIR_ABSORPTION_GAINHF, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_HFREFERENCE</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 1000.0f to 20000.0f; default 5000.0f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float HfReference
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_HFREFERENCE);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_HFREFERENCE, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_LFREFERENCE</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 20.0f to 1000.0f; default 250.0f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float LfReference
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_LFREFERENCE);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_LFREFERENCE, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_ROOM_ROLLOFF_FACTOR</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0.0f to 10.0f; default 0.0f.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float RoomRolloffFactor
|
|
{
|
|
get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_ROOM_ROLLOFF_FACTOR);
|
|
set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets/sets <c>AL_EAXREVERB_DECAY_HFLIMIT</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// range 0 to 1; default 1.
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool DecayHfLimit
|
|
{
|
|
get => Al.GetEffecti(Effect.Name, AL_EAXREVERB_DECAY_HFLIMIT) != AL_FALSE;
|
|
set => Al.PInvoke.Effecti(Effect.Name, AL_EAXREVERB_DECAY_HFLIMIT, value ? AL_TRUE : AL_FALSE);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Sets every parameter from a full EAX reverb parameter set (e.g. a <see cref="ReverbPreset"/> value).
|
|
/// </summary>
|
|
public void Set(in ReverbProperties properties)
|
|
{
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DENSITY, properties.Density);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DIFFUSION, properties.Diffusion);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_GAIN, properties.Gain);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_GAINHF, properties.GainHf);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_GAINLF, properties.GainLf);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DECAY_TIME, properties.DecayTime);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DECAY_HFRATIO, properties.DecayHfRatio);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DECAY_LFRATIO, properties.DecayLfRatio);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_REFLECTIONS_GAIN, properties.ReflectionsGain);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_REFLECTIONS_DELAY, properties.ReflectionsDelay);
|
|
Al.SetEffectfv3(Effect.Name, AL_EAXREVERB_REFLECTIONS_PAN, properties.ReflectionsPan);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_LATE_REVERB_GAIN, properties.LateReverbGain);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_LATE_REVERB_DELAY, properties.LateReverbDelay);
|
|
Al.SetEffectfv3(Effect.Name, AL_EAXREVERB_LATE_REVERB_PAN, properties.LateReverbPan);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_ECHO_TIME, properties.EchoTime);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_ECHO_DEPTH, properties.EchoDepth);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_MODULATION_TIME, properties.ModulationTime);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_MODULATION_DEPTH, properties.ModulationDepth);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_AIR_ABSORPTION_GAINHF, properties.AirAbsorptionGainHf);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_HFREFERENCE, properties.HfReference);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_LFREFERENCE, properties.LfReference);
|
|
Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, properties.RoomRolloffFactor);
|
|
Al.PInvoke.Effecti(Effect.Name, AL_EAXREVERB_DECAY_HFLIMIT, properties.DecayHfLimit ? AL_TRUE : AL_FALSE);
|
|
}
|
|
}
|
|
}
|