mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-27 13:38:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
23 changed files with 784842 additions and 0 deletions
100
Brutal.OpenAl/Generated/Al/Efx/AutowahEffect.gen.cs
Normal file
100
Brutal.OpenAl/Generated/Al/Efx/AutowahEffect.gen.cs
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
// <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);
|
||||
}
|
||||
}
|
||||
}
|
||||
86
Brutal.OpenAl/Generated/Al/Efx/BandpassFilter.gen.cs
Normal file
86
Brutal.OpenAl/Generated/Al/Efx/BandpassFilter.gen.cs
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
// <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_FILTER_BANDPASS</c> filter (see <see cref="AlFilter"/>); requires <c>ALC_EXT_EFX</c>.
|
||||
/// </summary>
|
||||
public unsafe readonly partial struct BandpassFilter
|
||||
{
|
||||
/// <summary>
|
||||
/// The underlying filter handle.
|
||||
/// </summary>
|
||||
public readonly AlFilter Filter;
|
||||
|
||||
/// <summary>
|
||||
/// Wraps a filter handle without validating its type; prefer the checked conversion.
|
||||
/// </summary>
|
||||
public BandpassFilter(AlFilter filter) => Filter = filter;
|
||||
|
||||
/// <summary>
|
||||
/// The wrapper converts freely to its underlying handle.
|
||||
/// </summary>
|
||||
public static implicit operator AlFilter(BandpassFilter filter) => filter.Filter;
|
||||
|
||||
/// <summary>
|
||||
/// Converts a raw handle to the typed wrapper, checking <see cref="AlFilter.Type"/>.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidCastException">
|
||||
/// The filter's type is not <see cref="AlFilterType.Bandpass"/>.</exception>
|
||||
public static explicit operator BandpassFilter(AlFilter filter) =>
|
||||
filter.Type == AlFilterType.Bandpass
|
||||
? new BandpassFilter(filter)
|
||||
: throw new InvalidCastException($"Filter {filter.Name} has type {filter.Type}, not Bandpass.");
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the underlying filter (<see cref="AlFilter.Delete"/>).
|
||||
/// </summary>
|
||||
public void Delete() => Filter.Delete();
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_BANDPASS_GAIN</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.0f to 1.0f; default 1.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float Gain
|
||||
{
|
||||
get => Al.GetFilterf(Filter.Name, AL_BANDPASS_GAIN);
|
||||
set => Al.PInvoke.Filterf(Filter.Name, AL_BANDPASS_GAIN, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_BANDPASS_GAINLF</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.0f to 1.0f; default 1.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float GainLf
|
||||
{
|
||||
get => Al.GetFilterf(Filter.Name, AL_BANDPASS_GAINLF);
|
||||
set => Al.PInvoke.Filterf(Filter.Name, AL_BANDPASS_GAINLF, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_BANDPASS_GAINHF</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.0f to 1.0f; default 1.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float GainHf
|
||||
{
|
||||
get => Al.GetFilterf(Filter.Name, AL_BANDPASS_GAINHF);
|
||||
set => Al.PInvoke.Filterf(Filter.Name, AL_BANDPASS_GAINHF, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
128
Brutal.OpenAl/Generated/Al/Efx/ChorusEffect.gen.cs
Normal file
128
Brutal.OpenAl/Generated/Al/Efx/ChorusEffect.gen.cs
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
// <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);
|
||||
}
|
||||
}
|
||||
}
|
||||
58
Brutal.OpenAl/Generated/Al/Efx/CompressorEffect.gen.cs
Normal file
58
Brutal.OpenAl/Generated/Al/Efx/CompressorEffect.gen.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
// <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_COMPRESSOR</c> effect (see <see cref="AlEffect"/>); requires <c>ALC_EXT_EFX</c>.
|
||||
/// </summary>
|
||||
public unsafe readonly partial struct CompressorEffect
|
||||
{
|
||||
/// <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 CompressorEffect(AlEffect effect) => Effect = effect;
|
||||
|
||||
/// <summary>
|
||||
/// The wrapper converts freely to its underlying handle.
|
||||
/// </summary>
|
||||
public static implicit operator AlEffect(CompressorEffect 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.Compressor"/>.</exception>
|
||||
public static explicit operator CompressorEffect(AlEffect effect) =>
|
||||
effect.Type == AlEffectType.Compressor
|
||||
? new CompressorEffect(effect)
|
||||
: throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Compressor.");
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the underlying effect (<see cref="AlEffect.Delete"/>).
|
||||
/// </summary>
|
||||
public void Delete() => Effect.Delete();
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_COMPRESSOR_ONOFF</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0 to 1; default 1.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public bool Enabled
|
||||
{
|
||||
get => Al.GetEffecti(Effect.Name, AL_COMPRESSOR_ONOFF) != AL_FALSE;
|
||||
set => Al.PInvoke.Effecti(Effect.Name, AL_COMPRESSOR_ONOFF, value ? AL_TRUE : AL_FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
// <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_DEDICATED_DIALOGUE</c> effect (see <see cref="AlEffect"/>); requires <c>ALC_EXT_EFX</c>. Provided by <c>ALC_EXT_DEDICATED</c>.
|
||||
/// </summary>
|
||||
public unsafe readonly partial struct DedicatedDialogueEffect
|
||||
{
|
||||
/// <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 DedicatedDialogueEffect(AlEffect effect) => Effect = effect;
|
||||
|
||||
/// <summary>
|
||||
/// The wrapper converts freely to its underlying handle.
|
||||
/// </summary>
|
||||
public static implicit operator AlEffect(DedicatedDialogueEffect 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.DedicatedDialogue"/>.</exception>
|
||||
public static explicit operator DedicatedDialogueEffect(AlEffect effect) =>
|
||||
effect.Type == AlEffectType.DedicatedDialogue
|
||||
? new DedicatedDialogueEffect(effect)
|
||||
: throw new InvalidCastException(
|
||||
$"Effect {effect.Name} has type {effect.Type}, not DedicatedDialogue."
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the underlying effect (<see cref="AlEffect.Delete"/>).
|
||||
/// </summary>
|
||||
public void Delete() => Effect.Delete();
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_DEDICATED_GAIN</c>.
|
||||
/// </summary>
|
||||
public float Gain
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_DEDICATED_GAIN);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_DEDICATED_GAIN, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
// <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_DEDICATED_LOW_FREQUENCY_EFFECT</c> effect (see <see cref="AlEffect"/>); requires <c>ALC_EXT_EFX</c>. Provided by <c>ALC_EXT_DEDICATED</c>.
|
||||
/// </summary>
|
||||
public unsafe readonly partial struct DedicatedLowFrequencyEffect
|
||||
{
|
||||
/// <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 DedicatedLowFrequencyEffect(AlEffect effect) => Effect = effect;
|
||||
|
||||
/// <summary>
|
||||
/// The wrapper converts freely to its underlying handle.
|
||||
/// </summary>
|
||||
public static implicit operator AlEffect(DedicatedLowFrequencyEffect 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.DedicatedLowFrequencyEffect"/>.</exception>
|
||||
public static explicit operator DedicatedLowFrequencyEffect(AlEffect effect) =>
|
||||
effect.Type == AlEffectType.DedicatedLowFrequencyEffect
|
||||
? new DedicatedLowFrequencyEffect(effect)
|
||||
: throw new InvalidCastException(
|
||||
$"Effect {effect.Name} has type {effect.Type}, not DedicatedLowFrequencyEffect."
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the underlying effect (<see cref="AlEffect.Delete"/>).
|
||||
/// </summary>
|
||||
public void Delete() => Effect.Delete();
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_DEDICATED_GAIN</c>.
|
||||
/// </summary>
|
||||
public float Gain
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_DEDICATED_GAIN);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_DEDICATED_GAIN, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
114
Brutal.OpenAl/Generated/Al/Efx/DistortionEffect.gen.cs
Normal file
114
Brutal.OpenAl/Generated/Al/Efx/DistortionEffect.gen.cs
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
// <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_DISTORTION</c> effect (see <see cref="AlEffect"/>); requires <c>ALC_EXT_EFX</c>.
|
||||
/// </summary>
|
||||
public unsafe readonly partial struct DistortionEffect
|
||||
{
|
||||
/// <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 DistortionEffect(AlEffect effect) => Effect = effect;
|
||||
|
||||
/// <summary>
|
||||
/// The wrapper converts freely to its underlying handle.
|
||||
/// </summary>
|
||||
public static implicit operator AlEffect(DistortionEffect 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.Distortion"/>.</exception>
|
||||
public static explicit operator DistortionEffect(AlEffect effect) =>
|
||||
effect.Type == AlEffectType.Distortion
|
||||
? new DistortionEffect(effect)
|
||||
: throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Distortion.");
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the underlying effect (<see cref="AlEffect.Delete"/>).
|
||||
/// </summary>
|
||||
public void Delete() => Effect.Delete();
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_DISTORTION_EDGE</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.0f to 1.0f; default 0.2f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float Edge
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_DISTORTION_EDGE);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_EDGE, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_DISTORTION_GAIN</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.01f to 1.0f; default 0.05f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float Gain
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_DISTORTION_GAIN);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_GAIN, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_DISTORTION_LOWPASS_CUTOFF</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 80.0f to 24000.0f; default 8000.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float LowpassCutoff
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_DISTORTION_LOWPASS_CUTOFF);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_LOWPASS_CUTOFF, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_DISTORTION_EQCENTER</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 80.0f to 24000.0f; default 3600.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float EqCenter
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_DISTORTION_EQCENTER);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_EQCENTER, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_DISTORTION_EQBANDWIDTH</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 80.0f to 24000.0f; default 3600.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float EqBandwidth
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_DISTORTION_EQBANDWIDTH);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_EQBANDWIDTH, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
396
Brutal.OpenAl/Generated/Al/Efx/EaxReverbEffect.gen.cs
Normal file
396
Brutal.OpenAl/Generated/Al/Efx/EaxReverbEffect.gen.cs
Normal file
|
|
@ -0,0 +1,396 @@
|
|||
// <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);
|
||||
}
|
||||
}
|
||||
}
|
||||
113
Brutal.OpenAl/Generated/Al/Efx/EchoEffect.gen.cs
Normal file
113
Brutal.OpenAl/Generated/Al/Efx/EchoEffect.gen.cs
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
// <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);
|
||||
}
|
||||
}
|
||||
}
|
||||
131
Brutal.OpenAl/Generated/Al/Efx/Efx.Creates.gen.cs
Normal file
131
Brutal.OpenAl/Generated/Al/Efx/Efx.Creates.gen.cs
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.OpenAl.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
using static Brutal.OpenAlApi.Al.Constants;
|
||||
|
||||
namespace Brutal.OpenAlApi
|
||||
{
|
||||
public sealed unsafe partial class Efx
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a <see cref="ReverbEffect"/> (<c>AL_EFFECT_REVERB</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public ReverbEffect CreateReverb() => new ReverbEffect(CreateEffectChecked(AL_EFFECT_REVERB));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="EaxReverbEffect"/> (<c>AL_EFFECT_EAXREVERB</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public EaxReverbEffect CreateEaxReverb() => new EaxReverbEffect(CreateEffectChecked(AL_EFFECT_EAXREVERB));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="ChorusEffect"/> (<c>AL_EFFECT_CHORUS</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public ChorusEffect CreateChorus() => new ChorusEffect(CreateEffectChecked(AL_EFFECT_CHORUS));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="DistortionEffect"/> (<c>AL_EFFECT_DISTORTION</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public DistortionEffect CreateDistortion() => new DistortionEffect(CreateEffectChecked(AL_EFFECT_DISTORTION));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="EchoEffect"/> (<c>AL_EFFECT_ECHO</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public EchoEffect CreateEcho() => new EchoEffect(CreateEffectChecked(AL_EFFECT_ECHO));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="FlangerEffect"/> (<c>AL_EFFECT_FLANGER</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public FlangerEffect CreateFlanger() => new FlangerEffect(CreateEffectChecked(AL_EFFECT_FLANGER));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="FrequencyShifterEffect"/> (<c>AL_EFFECT_FREQUENCY_SHIFTER</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public FrequencyShifterEffect CreateFrequencyShifter() =>
|
||||
new FrequencyShifterEffect(CreateEffectChecked(AL_EFFECT_FREQUENCY_SHIFTER));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="VocalMorpherEffect"/> (<c>AL_EFFECT_VOCAL_MORPHER</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public VocalMorpherEffect CreateVocalMorpher() =>
|
||||
new VocalMorpherEffect(CreateEffectChecked(AL_EFFECT_VOCAL_MORPHER));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="PitchShifterEffect"/> (<c>AL_EFFECT_PITCH_SHIFTER</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public PitchShifterEffect CreatePitchShifter() =>
|
||||
new PitchShifterEffect(CreateEffectChecked(AL_EFFECT_PITCH_SHIFTER));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="RingModulatorEffect"/> (<c>AL_EFFECT_RING_MODULATOR</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public RingModulatorEffect CreateRingModulator() =>
|
||||
new RingModulatorEffect(CreateEffectChecked(AL_EFFECT_RING_MODULATOR));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="AutowahEffect"/> (<c>AL_EFFECT_AUTOWAH</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public AutowahEffect CreateAutowah() => new AutowahEffect(CreateEffectChecked(AL_EFFECT_AUTOWAH));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="CompressorEffect"/> (<c>AL_EFFECT_COMPRESSOR</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public CompressorEffect CreateCompressor() => new CompressorEffect(CreateEffectChecked(AL_EFFECT_COMPRESSOR));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="EqualizerEffect"/> (<c>AL_EFFECT_EQUALIZER</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public EqualizerEffect CreateEqualizer() => new EqualizerEffect(CreateEffectChecked(AL_EFFECT_EQUALIZER));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="LowpassFilter"/> (<c>AL_FILTER_LOWPASS</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public LowpassFilter CreateLowpass() => new LowpassFilter(CreateFilterChecked(AL_FILTER_LOWPASS));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="HighpassFilter"/> (<c>AL_FILTER_HIGHPASS</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public HighpassFilter CreateHighpass() => new HighpassFilter(CreateFilterChecked(AL_FILTER_HIGHPASS));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="BandpassFilter"/> (<c>AL_FILTER_BANDPASS</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public BandpassFilter CreateBandpass() => new BandpassFilter(CreateFilterChecked(AL_FILTER_BANDPASS));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="DedicatedDialogueEffect"/> (<c>AL_EFFECT_DEDICATED_DIALOGUE</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public DedicatedDialogueEffect CreateDedicatedDialogue() =>
|
||||
new DedicatedDialogueEffect(CreateEffectChecked(AL_EFFECT_DEDICATED_DIALOGUE));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="DedicatedLowFrequencyEffect"/> (<c>AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation or type assignment failed; nothing is left behind.</exception>
|
||||
public DedicatedLowFrequencyEffect CreateDedicatedLowFrequencyEffect() =>
|
||||
new DedicatedLowFrequencyEffect(CreateEffectChecked(AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT));
|
||||
|
||||
/// <summary>
|
||||
/// Creates an <see cref="AlAuxiliaryEffectSlot"/> (<c>alGenAuxiliaryEffectSlots</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="AlException">Creation failed; nothing is left behind.</exception>
|
||||
public AlAuxiliaryEffectSlot CreateAuxiliaryEffectSlot() => CreateSlotChecked();
|
||||
}
|
||||
}
|
||||
167
Brutal.OpenAl/Generated/Al/Efx/Efx.ObjectNames.gen.cs
Normal file
167
Brutal.OpenAl/Generated/Al/Efx/Efx.ObjectNames.gen.cs
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.OpenAl.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.OpenAlApi
|
||||
{
|
||||
public sealed unsafe partial class Efx
|
||||
{
|
||||
/// <summary>
|
||||
/// Generates auxiliary effect slots (<c>alGenAuxiliaryEffectSlots</c>), filling <paramref name="auxiliaryEffectSlots"/>.
|
||||
/// </summary>
|
||||
/// <param name="auxiliaryEffectSlots">The span to fill; its length determines how many auxiliary effect
|
||||
/// slots are generated.</param>
|
||||
public void GenAuxiliaryEffectSlots(Span<AlAuxiliaryEffectSlot> auxiliaryEffectSlots)
|
||||
{
|
||||
Device.ThrowIfDisposed();
|
||||
if (auxiliaryEffectSlots.IsEmpty)
|
||||
return;
|
||||
var names = auxiliaryEffectSlots.Cast<AlAuxiliaryEffectSlot, uint>();
|
||||
fixed (uint* p = names)
|
||||
Al.PInvoke.GenAuxiliaryEffectSlots(names.Length, p);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates auxiliary effect slots (<c>alGenAuxiliaryEffectSlots</c>). Allocates the returned array; use the <c>Span</c> overload to bring your own storage.
|
||||
/// </summary>
|
||||
/// <param name="count">How many auxiliary effect slots to generate; a non-positive count returns an
|
||||
/// empty array.</param>
|
||||
public AlAuxiliaryEffectSlot[] GenAuxiliaryEffectSlots(int count)
|
||||
{
|
||||
Device.ThrowIfDisposed();
|
||||
if (count <= 0)
|
||||
return [];
|
||||
var auxiliaryEffectSlots = new AlAuxiliaryEffectSlot[count];
|
||||
GenAuxiliaryEffectSlots(auxiliaryEffectSlots.AsSpan());
|
||||
return auxiliaryEffectSlots;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates a single auxiliary effect slot.
|
||||
/// </summary>
|
||||
public AlAuxiliaryEffectSlot GenAuxiliaryEffectSlot()
|
||||
{
|
||||
Span<AlAuxiliaryEffectSlot> auxiliaryEffectSlot = stackalloc AlAuxiliaryEffectSlot[1];
|
||||
GenAuxiliaryEffectSlots(auxiliaryEffectSlot);
|
||||
return auxiliaryEffectSlot[0];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the given auxiliary effect slots (<c>alDeleteAuxiliaryEffectSlots</c>). Each slot's effect must be detached first.
|
||||
/// </summary>
|
||||
/// <param name="auxiliaryEffectSlots">The auxiliary effect slots to delete.</param>
|
||||
public void DeleteAuxiliaryEffectSlots(ReadOnlySpan<AlAuxiliaryEffectSlot> auxiliaryEffectSlots)
|
||||
{
|
||||
Device.ThrowIfDisposed();
|
||||
if (auxiliaryEffectSlots.IsEmpty)
|
||||
return;
|
||||
var names = auxiliaryEffectSlots.Cast<AlAuxiliaryEffectSlot, uint>();
|
||||
fixed (uint* p = names)
|
||||
Al.PInvoke.DeleteAuxiliaryEffectSlots(names.Length, p);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates untyped effects (<c>alGenEffects</c>), filling <paramref name="effects"/>.
|
||||
/// </summary>
|
||||
/// <param name="effects">The span to fill; its length determines how many effects are generated.</param>
|
||||
public void GenEffects(Span<AlEffect> effects)
|
||||
{
|
||||
Device.ThrowIfDisposed();
|
||||
if (effects.IsEmpty)
|
||||
return;
|
||||
var names = effects.Cast<AlEffect, uint>();
|
||||
fixed (uint* p = names)
|
||||
Al.PInvoke.GenEffects(names.Length, p);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates untyped effects (<c>alGenEffects</c>). Allocates the returned array; use the <c>Span</c> overload to bring your own storage.
|
||||
/// </summary>
|
||||
/// <param name="count">How many effects to generate; a non-positive count returns an empty array.</param>
|
||||
public AlEffect[] GenEffects(int count)
|
||||
{
|
||||
Device.ThrowIfDisposed();
|
||||
if (count <= 0)
|
||||
return [];
|
||||
var effects = new AlEffect[count];
|
||||
GenEffects(effects.AsSpan());
|
||||
return effects;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates a single untyped effect.
|
||||
/// </summary>
|
||||
public AlEffect GenEffect()
|
||||
{
|
||||
Span<AlEffect> effect = stackalloc AlEffect[1];
|
||||
GenEffects(effect);
|
||||
return effect[0];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the given effects (<c>alDeleteEffects</c>). Each must not be attached to a slot.
|
||||
/// </summary>
|
||||
/// <param name="effects">The effects to delete.</param>
|
||||
public void DeleteEffects(ReadOnlySpan<AlEffect> effects)
|
||||
{
|
||||
Device.ThrowIfDisposed();
|
||||
if (effects.IsEmpty)
|
||||
return;
|
||||
var names = effects.Cast<AlEffect, uint>();
|
||||
fixed (uint* p = names)
|
||||
Al.PInvoke.DeleteEffects(names.Length, p);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates untyped filters (<c>alGenFilters</c>), filling <paramref name="filters"/>.
|
||||
/// </summary>
|
||||
/// <param name="filters">The span to fill; its length determines how many filters are generated.</param>
|
||||
public void GenFilters(Span<AlFilter> filters)
|
||||
{
|
||||
Device.ThrowIfDisposed();
|
||||
if (filters.IsEmpty)
|
||||
return;
|
||||
var names = filters.Cast<AlFilter, uint>();
|
||||
fixed (uint* p = names)
|
||||
Al.PInvoke.GenFilters(names.Length, p);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates untyped filters (<c>alGenFilters</c>). Allocates the returned array; use the <c>Span</c> overload to bring your own storage.
|
||||
/// </summary>
|
||||
/// <param name="count">How many filters to generate; a non-positive count returns an empty array.</param>
|
||||
public AlFilter[] GenFilters(int count)
|
||||
{
|
||||
Device.ThrowIfDisposed();
|
||||
if (count <= 0)
|
||||
return [];
|
||||
var filters = new AlFilter[count];
|
||||
GenFilters(filters.AsSpan());
|
||||
return filters;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates a single untyped filter.
|
||||
/// </summary>
|
||||
public AlFilter GenFilter()
|
||||
{
|
||||
Span<AlFilter> filter = stackalloc AlFilter[1];
|
||||
GenFilters(filter);
|
||||
return filter[0];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the given filters (<c>alDeleteFilters</c>). Each must not be attached to a source or send.
|
||||
/// </summary>
|
||||
/// <param name="filters">The filters to delete.</param>
|
||||
public void DeleteFilters(ReadOnlySpan<AlFilter> filters)
|
||||
{
|
||||
Device.ThrowIfDisposed();
|
||||
if (filters.IsEmpty)
|
||||
return;
|
||||
var names = filters.Cast<AlFilter, uint>();
|
||||
fixed (uint* p = names)
|
||||
Al.PInvoke.DeleteFilters(names.Length, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
287
Brutal.OpenAl/Generated/Al/Efx/EfxParams.gen.cs
Normal file
287
Brutal.OpenAl/Generated/Al/Efx/EfxParams.gen.cs
Normal file
|
|
@ -0,0 +1,287 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.OpenAl.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.OpenAlApi.Params
|
||||
{
|
||||
/// <summary>
|
||||
/// Keyed EFX effect parameter access (<c>alEffectf</c>/<c>alEffecti</c>/<c>alEffectfv</c>) as extension members on <see cref="AlEffect"/>, for generic or data-driven code. Typical code uses the typed wrappers (<see cref="ReverbEffect"/> and friends) instead.
|
||||
/// </summary>
|
||||
public static class EffectParams
|
||||
{
|
||||
extension(AlEffect effect)
|
||||
{
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_EFFECT_REVERB</c> parameter (<c>alEffectf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlReverbf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_EFFECT_REVERB</c> parameter (<c>alGetEffectf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlReverbf param) => Al.GetEffectf(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets an integer-valued <c>AL_EFFECT_REVERB</c> parameter (<c>alEffecti</c>).
|
||||
/// </summary>
|
||||
public void Set(AlReverbi param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets an integer-valued <c>AL_EFFECT_REVERB</c> parameter (<c>alGetEffecti</c>).
|
||||
/// </summary>
|
||||
public int Get(AlReverbi param) => Al.GetEffecti(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_EFFECT_EAXREVERB</c> parameter (<c>alEffectf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlEaxReverbf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_EFFECT_EAXREVERB</c> parameter (<c>alGetEffectf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlEaxReverbf param) => Al.GetEffectf(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets an integer-valued <c>AL_EFFECT_EAXREVERB</c> parameter (<c>alEffecti</c>).
|
||||
/// </summary>
|
||||
public void Set(AlEaxReverbi param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets an integer-valued <c>AL_EFFECT_EAXREVERB</c> parameter (<c>alGetEffecti</c>).
|
||||
/// </summary>
|
||||
public int Get(AlEaxReverbi param) => Al.GetEffecti(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a <see cref="float3"/>-valued <c>AL_EFFECT_EAXREVERB</c> parameter (<c>alEffectfv</c>).
|
||||
/// </summary>
|
||||
public void Set(AlEaxReverb3f param, float3 value) => Al.SetEffectfv3(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="float3"/>-valued <c>AL_EFFECT_EAXREVERB</c> parameter (<c>alGetEffectfv</c>).
|
||||
/// </summary>
|
||||
public float3 Get(AlEaxReverb3f param) => Al.GetEffectfv3(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_EFFECT_CHORUS</c> parameter (<c>alEffectf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlChorusf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_EFFECT_CHORUS</c> parameter (<c>alGetEffectf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlChorusf param) => Al.GetEffectf(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets an integer-valued <c>AL_EFFECT_CHORUS</c> parameter (<c>alEffecti</c>).
|
||||
/// </summary>
|
||||
public void Set(AlChorusi param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets an integer-valued <c>AL_EFFECT_CHORUS</c> parameter (<c>alGetEffecti</c>).
|
||||
/// </summary>
|
||||
public int Get(AlChorusi param) => Al.GetEffecti(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_EFFECT_DISTORTION</c> parameter (<c>alEffectf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlDistortionf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_EFFECT_DISTORTION</c> parameter (<c>alGetEffectf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlDistortionf param) => Al.GetEffectf(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_EFFECT_ECHO</c> parameter (<c>alEffectf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlEchof param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_EFFECT_ECHO</c> parameter (<c>alGetEffectf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlEchof param) => Al.GetEffectf(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_EFFECT_FLANGER</c> parameter (<c>alEffectf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlFlangerf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_EFFECT_FLANGER</c> parameter (<c>alGetEffectf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlFlangerf param) => Al.GetEffectf(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets an integer-valued <c>AL_EFFECT_FLANGER</c> parameter (<c>alEffecti</c>).
|
||||
/// </summary>
|
||||
public void Set(AlFlangeri param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets an integer-valued <c>AL_EFFECT_FLANGER</c> parameter (<c>alGetEffecti</c>).
|
||||
/// </summary>
|
||||
public int Get(AlFlangeri param) => Al.GetEffecti(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_EFFECT_FREQUENCY_SHIFTER</c> parameter (<c>alEffectf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlFrequencyShifterf param, float value) =>
|
||||
Al.PInvoke.Effectf(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_EFFECT_FREQUENCY_SHIFTER</c> parameter (<c>alGetEffectf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlFrequencyShifterf param) => Al.GetEffectf(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets an integer-valued <c>AL_EFFECT_FREQUENCY_SHIFTER</c> parameter (<c>alEffecti</c>).
|
||||
/// </summary>
|
||||
public void Set(AlFrequencyShifteri param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets an integer-valued <c>AL_EFFECT_FREQUENCY_SHIFTER</c> parameter (<c>alGetEffecti</c>).
|
||||
/// </summary>
|
||||
public int Get(AlFrequencyShifteri param) => Al.GetEffecti(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_EFFECT_VOCAL_MORPHER</c> parameter (<c>alEffectf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlVocalMorpherf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_EFFECT_VOCAL_MORPHER</c> parameter (<c>alGetEffectf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlVocalMorpherf param) => Al.GetEffectf(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets an integer-valued <c>AL_EFFECT_VOCAL_MORPHER</c> parameter (<c>alEffecti</c>).
|
||||
/// </summary>
|
||||
public void Set(AlVocalMorpheri param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets an integer-valued <c>AL_EFFECT_VOCAL_MORPHER</c> parameter (<c>alGetEffecti</c>).
|
||||
/// </summary>
|
||||
public int Get(AlVocalMorpheri param) => Al.GetEffecti(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets an integer-valued <c>AL_EFFECT_PITCH_SHIFTER</c> parameter (<c>alEffecti</c>).
|
||||
/// </summary>
|
||||
public void Set(AlPitchShifteri param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets an integer-valued <c>AL_EFFECT_PITCH_SHIFTER</c> parameter (<c>alGetEffecti</c>).
|
||||
/// </summary>
|
||||
public int Get(AlPitchShifteri param) => Al.GetEffecti(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_EFFECT_RING_MODULATOR</c> parameter (<c>alEffectf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlRingModulatorf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_EFFECT_RING_MODULATOR</c> parameter (<c>alGetEffectf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlRingModulatorf param) => Al.GetEffectf(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets an integer-valued <c>AL_EFFECT_RING_MODULATOR</c> parameter (<c>alEffecti</c>).
|
||||
/// </summary>
|
||||
public void Set(AlRingModulatori param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets an integer-valued <c>AL_EFFECT_RING_MODULATOR</c> parameter (<c>alGetEffecti</c>).
|
||||
/// </summary>
|
||||
public int Get(AlRingModulatori param) => Al.GetEffecti(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_EFFECT_AUTOWAH</c> parameter (<c>alEffectf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlAutowahf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_EFFECT_AUTOWAH</c> parameter (<c>alGetEffectf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlAutowahf param) => Al.GetEffectf(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets an integer-valued <c>AL_EFFECT_COMPRESSOR</c> parameter (<c>alEffecti</c>).
|
||||
/// </summary>
|
||||
public void Set(AlCompressori param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets an integer-valued <c>AL_EFFECT_COMPRESSOR</c> parameter (<c>alGetEffecti</c>).
|
||||
/// </summary>
|
||||
public int Get(AlCompressori param) => Al.GetEffecti(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_EFFECT_EQUALIZER</c> parameter (<c>alEffectf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlEqualizerf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_EFFECT_EQUALIZER</c> parameter (<c>alGetEffectf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlEqualizerf param) => Al.GetEffectf(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_EFFECT_DEDICATED_DIALOGUE</c> parameter (<c>alEffectf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlDedicatedDialoguef param, float value) =>
|
||||
Al.PInvoke.Effectf(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_EFFECT_DEDICATED_DIALOGUE</c> parameter (<c>alGetEffectf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlDedicatedDialoguef param) => Al.GetEffectf(effect.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT</c> parameter (<c>alEffectf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlDedicatedLowFrequencyEffectf param, float value) =>
|
||||
Al.PInvoke.Effectf(effect.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT</c> parameter (<c>alGetEffectf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlDedicatedLowFrequencyEffectf param) => Al.GetEffectf(effect.Name, (int)param);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Keyed EFX filter parameter access (<c>alFilterf</c>/<c>alFilteri</c>) as extension members on <see cref="AlFilter"/>, for generic or data-driven code. Typical code uses the typed wrappers (<see cref="LowpassFilter"/> and friends) instead.
|
||||
/// </summary>
|
||||
public static class FilterParams
|
||||
{
|
||||
extension(AlFilter filter)
|
||||
{
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_FILTER_LOWPASS</c> parameter (<c>alFilterf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlLowpassf param, float value) => Al.PInvoke.Filterf(filter.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_FILTER_LOWPASS</c> parameter (<c>alGetFilterf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlLowpassf param) => Al.GetFilterf(filter.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_FILTER_HIGHPASS</c> parameter (<c>alFilterf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlHighpassf param, float value) => Al.PInvoke.Filterf(filter.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_FILTER_HIGHPASS</c> parameter (<c>alGetFilterf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlHighpassf param) => Al.GetFilterf(filter.Name, (int)param);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a float-valued <c>AL_FILTER_BANDPASS</c> parameter (<c>alFilterf</c>).
|
||||
/// </summary>
|
||||
public void Set(AlBandpassf param, float value) => Al.PInvoke.Filterf(filter.Name, (int)param, value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a float-valued <c>AL_FILTER_BANDPASS</c> parameter (<c>alGetFilterf</c>).
|
||||
/// </summary>
|
||||
public float Get(AlBandpassf param) => Al.GetFilterf(filter.Name, (int)param);
|
||||
}
|
||||
}
|
||||
}
|
||||
184
Brutal.OpenAl/Generated/Al/Efx/EqualizerEffect.gen.cs
Normal file
184
Brutal.OpenAl/Generated/Al/Efx/EqualizerEffect.gen.cs
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
// <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_EQUALIZER</c> effect (see <see cref="AlEffect"/>); requires <c>ALC_EXT_EFX</c>.
|
||||
/// </summary>
|
||||
public unsafe readonly partial struct EqualizerEffect
|
||||
{
|
||||
/// <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 EqualizerEffect(AlEffect effect) => Effect = effect;
|
||||
|
||||
/// <summary>
|
||||
/// The wrapper converts freely to its underlying handle.
|
||||
/// </summary>
|
||||
public static implicit operator AlEffect(EqualizerEffect 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.Equalizer"/>.</exception>
|
||||
public static explicit operator EqualizerEffect(AlEffect effect) =>
|
||||
effect.Type == AlEffectType.Equalizer
|
||||
? new EqualizerEffect(effect)
|
||||
: throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Equalizer.");
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the underlying effect (<see cref="AlEffect.Delete"/>).
|
||||
/// </summary>
|
||||
public void Delete() => Effect.Delete();
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_EQUALIZER_LOW_GAIN</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.126f to 7.943f; default 1.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float LowGain
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_LOW_GAIN);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_LOW_GAIN, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_EQUALIZER_LOW_CUTOFF</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 50.0f to 800.0f; default 200.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float LowCutoff
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_LOW_CUTOFF);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_LOW_CUTOFF, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_EQUALIZER_MID1_GAIN</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.126f to 7.943f; default 1.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float Mid1Gain
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_MID1_GAIN);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_MID1_GAIN, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_EQUALIZER_MID1_CENTER</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 200.0f to 3000.0f; default 500.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float Mid1Center
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_MID1_CENTER);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_MID1_CENTER, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_EQUALIZER_MID1_WIDTH</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.01f to 1.0f; default 1.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float Mid1Width
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_MID1_WIDTH);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_MID1_WIDTH, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_EQUALIZER_MID2_GAIN</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.126f to 7.943f; default 1.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float Mid2Gain
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_MID2_GAIN);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_MID2_GAIN, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_EQUALIZER_MID2_CENTER</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 1000.0f to 8000.0f; default 3000.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float Mid2Center
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_MID2_CENTER);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_MID2_CENTER, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_EQUALIZER_MID2_WIDTH</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.01f to 1.0f; default 1.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float Mid2Width
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_MID2_WIDTH);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_MID2_WIDTH, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_EQUALIZER_HIGH_GAIN</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.126f to 7.943f; default 1.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float HighGain
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_HIGH_GAIN);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_HIGH_GAIN, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_EQUALIZER_HIGH_CUTOFF</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 4000.0f to 16000.0f; default 6000.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float HighCutoff
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_HIGH_CUTOFF);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_HIGH_CUTOFF, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
128
Brutal.OpenAl/Generated/Al/Efx/FlangerEffect.gen.cs
Normal file
128
Brutal.OpenAl/Generated/Al/Efx/FlangerEffect.gen.cs
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
// <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);
|
||||
}
|
||||
}
|
||||
}
|
||||
86
Brutal.OpenAl/Generated/Al/Efx/FrequencyShifterEffect.gen.cs
Normal file
86
Brutal.OpenAl/Generated/Al/Efx/FrequencyShifterEffect.gen.cs
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
// <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_FREQUENCY_SHIFTER</c> effect (see <see cref="AlEffect"/>); requires <c>ALC_EXT_EFX</c>.
|
||||
/// </summary>
|
||||
public unsafe readonly partial struct FrequencyShifterEffect
|
||||
{
|
||||
/// <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 FrequencyShifterEffect(AlEffect effect) => Effect = effect;
|
||||
|
||||
/// <summary>
|
||||
/// The wrapper converts freely to its underlying handle.
|
||||
/// </summary>
|
||||
public static implicit operator AlEffect(FrequencyShifterEffect 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.FrequencyShifter"/>.</exception>
|
||||
public static explicit operator FrequencyShifterEffect(AlEffect effect) =>
|
||||
effect.Type == AlEffectType.FrequencyShifter
|
||||
? new FrequencyShifterEffect(effect)
|
||||
: throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not FrequencyShifter.");
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the underlying effect (<see cref="AlEffect.Delete"/>).
|
||||
/// </summary>
|
||||
public void Delete() => Effect.Delete();
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_FREQUENCY_SHIFTER_FREQUENCY</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.0f to 24000.0f; default 0.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float Frequency
|
||||
{
|
||||
get => Al.GetEffectf(Effect.Name, AL_FREQUENCY_SHIFTER_FREQUENCY);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_FREQUENCY_SHIFTER_FREQUENCY, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_FREQUENCY_SHIFTER_LEFT_DIRECTION</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0 to 2; default 0.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public AlFrequencyShifterDirection LeftDirection
|
||||
{
|
||||
get => (AlFrequencyShifterDirection)Al.GetEffecti(Effect.Name, AL_FREQUENCY_SHIFTER_LEFT_DIRECTION);
|
||||
set => Al.PInvoke.Effecti(Effect.Name, AL_FREQUENCY_SHIFTER_LEFT_DIRECTION, (int)value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0 to 2; default 0.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public AlFrequencyShifterDirection RightDirection
|
||||
{
|
||||
get => (AlFrequencyShifterDirection)Al.GetEffecti(Effect.Name, AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION);
|
||||
set => Al.PInvoke.Effecti(Effect.Name, AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION, (int)value);
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Brutal.OpenAl/Generated/Al/Efx/HighpassFilter.gen.cs
Normal file
72
Brutal.OpenAl/Generated/Al/Efx/HighpassFilter.gen.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
// <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_FILTER_HIGHPASS</c> filter (see <see cref="AlFilter"/>); requires <c>ALC_EXT_EFX</c>.
|
||||
/// </summary>
|
||||
public unsafe readonly partial struct HighpassFilter
|
||||
{
|
||||
/// <summary>
|
||||
/// The underlying filter handle.
|
||||
/// </summary>
|
||||
public readonly AlFilter Filter;
|
||||
|
||||
/// <summary>
|
||||
/// Wraps a filter handle without validating its type; prefer the checked conversion.
|
||||
/// </summary>
|
||||
public HighpassFilter(AlFilter filter) => Filter = filter;
|
||||
|
||||
/// <summary>
|
||||
/// The wrapper converts freely to its underlying handle.
|
||||
/// </summary>
|
||||
public static implicit operator AlFilter(HighpassFilter filter) => filter.Filter;
|
||||
|
||||
/// <summary>
|
||||
/// Converts a raw handle to the typed wrapper, checking <see cref="AlFilter.Type"/>.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidCastException">
|
||||
/// The filter's type is not <see cref="AlFilterType.Highpass"/>.</exception>
|
||||
public static explicit operator HighpassFilter(AlFilter filter) =>
|
||||
filter.Type == AlFilterType.Highpass
|
||||
? new HighpassFilter(filter)
|
||||
: throw new InvalidCastException($"Filter {filter.Name} has type {filter.Type}, not Highpass.");
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the underlying filter (<see cref="AlFilter.Delete"/>).
|
||||
/// </summary>
|
||||
public void Delete() => Filter.Delete();
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_HIGHPASS_GAIN</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.0f to 1.0f; default 1.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float Gain
|
||||
{
|
||||
get => Al.GetFilterf(Filter.Name, AL_HIGHPASS_GAIN);
|
||||
set => Al.PInvoke.Filterf(Filter.Name, AL_HIGHPASS_GAIN, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_HIGHPASS_GAINLF</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.0f to 1.0f; default 1.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float GainLf
|
||||
{
|
||||
get => Al.GetFilterf(Filter.Name, AL_HIGHPASS_GAINLF);
|
||||
set => Al.PInvoke.Filterf(Filter.Name, AL_HIGHPASS_GAINLF, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Brutal.OpenAl/Generated/Al/Efx/LowpassFilter.gen.cs
Normal file
72
Brutal.OpenAl/Generated/Al/Efx/LowpassFilter.gen.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
// <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_FILTER_LOWPASS</c> filter (see <see cref="AlFilter"/>); requires <c>ALC_EXT_EFX</c>.
|
||||
/// </summary>
|
||||
public unsafe readonly partial struct LowpassFilter
|
||||
{
|
||||
/// <summary>
|
||||
/// The underlying filter handle.
|
||||
/// </summary>
|
||||
public readonly AlFilter Filter;
|
||||
|
||||
/// <summary>
|
||||
/// Wraps a filter handle without validating its type; prefer the checked conversion.
|
||||
/// </summary>
|
||||
public LowpassFilter(AlFilter filter) => Filter = filter;
|
||||
|
||||
/// <summary>
|
||||
/// The wrapper converts freely to its underlying handle.
|
||||
/// </summary>
|
||||
public static implicit operator AlFilter(LowpassFilter filter) => filter.Filter;
|
||||
|
||||
/// <summary>
|
||||
/// Converts a raw handle to the typed wrapper, checking <see cref="AlFilter.Type"/>.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidCastException">
|
||||
/// The filter's type is not <see cref="AlFilterType.Lowpass"/>.</exception>
|
||||
public static explicit operator LowpassFilter(AlFilter filter) =>
|
||||
filter.Type == AlFilterType.Lowpass
|
||||
? new LowpassFilter(filter)
|
||||
: throw new InvalidCastException($"Filter {filter.Name} has type {filter.Type}, not Lowpass.");
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the underlying filter (<see cref="AlFilter.Delete"/>).
|
||||
/// </summary>
|
||||
public void Delete() => Filter.Delete();
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_LOWPASS_GAIN</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.0f to 1.0f; default 1.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float Gain
|
||||
{
|
||||
get => Al.GetFilterf(Filter.Name, AL_LOWPASS_GAIN);
|
||||
set => Al.PInvoke.Filterf(Filter.Name, AL_LOWPASS_GAIN, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_LOWPASS_GAINHF</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0.0f to 1.0f; default 1.0f.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public float GainHf
|
||||
{
|
||||
get => Al.GetFilterf(Filter.Name, AL_LOWPASS_GAINHF);
|
||||
set => Al.PInvoke.Filterf(Filter.Name, AL_LOWPASS_GAINHF, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Brutal.OpenAl/Generated/Al/Efx/PitchShifterEffect.gen.cs
Normal file
72
Brutal.OpenAl/Generated/Al/Efx/PitchShifterEffect.gen.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
// <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_PITCH_SHIFTER</c> effect (see <see cref="AlEffect"/>); requires <c>ALC_EXT_EFX</c>.
|
||||
/// </summary>
|
||||
public unsafe readonly partial struct PitchShifterEffect
|
||||
{
|
||||
/// <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 PitchShifterEffect(AlEffect effect) => Effect = effect;
|
||||
|
||||
/// <summary>
|
||||
/// The wrapper converts freely to its underlying handle.
|
||||
/// </summary>
|
||||
public static implicit operator AlEffect(PitchShifterEffect 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.PitchShifter"/>.</exception>
|
||||
public static explicit operator PitchShifterEffect(AlEffect effect) =>
|
||||
effect.Type == AlEffectType.PitchShifter
|
||||
? new PitchShifterEffect(effect)
|
||||
: throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not PitchShifter.");
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the underlying effect (<see cref="AlEffect.Delete"/>).
|
||||
/// </summary>
|
||||
public void Delete() => Effect.Delete();
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_PITCH_SHIFTER_COARSE_TUNE</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range -12 to 12; default 12.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public int CoarseTune
|
||||
{
|
||||
get => Al.GetEffecti(Effect.Name, AL_PITCH_SHIFTER_COARSE_TUNE);
|
||||
set => Al.PInvoke.Effecti(Effect.Name, AL_PITCH_SHIFTER_COARSE_TUNE, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_PITCH_SHIFTER_FINE_TUNE</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range -50 to 50; default 0.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public int FineTune
|
||||
{
|
||||
get => Al.GetEffecti(Effect.Name, AL_PITCH_SHIFTER_FINE_TUNE);
|
||||
set => Al.PInvoke.Effecti(Effect.Name, AL_PITCH_SHIFTER_FINE_TUNE, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
246
Brutal.OpenAl/Generated/Al/Efx/ReverbEffect.gen.cs
Normal file
246
Brutal.OpenAl/Generated/Al/Efx/ReverbEffect.gen.cs
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
// <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_REVERB</c> effect (see <see cref="AlEffect"/>); requires <c>ALC_EXT_EFX</c>.
|
||||
/// </summary>
|
||||
public unsafe readonly partial struct ReverbEffect
|
||||
{
|
||||
/// <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 ReverbEffect(AlEffect effect) => Effect = effect;
|
||||
|
||||
/// <summary>
|
||||
/// The wrapper converts freely to its underlying handle.
|
||||
/// </summary>
|
||||
public static implicit operator AlEffect(ReverbEffect 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.Reverb"/>.</exception>
|
||||
public static explicit operator ReverbEffect(AlEffect effect) =>
|
||||
effect.Type == AlEffectType.Reverb
|
||||
? new ReverbEffect(effect)
|
||||
: throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Reverb.");
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the underlying effect (<see cref="AlEffect.Delete"/>).
|
||||
/// </summary>
|
||||
public void Delete() => Effect.Delete();
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_REVERB_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_REVERB_DENSITY);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DENSITY, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_REVERB_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_REVERB_DIFFUSION);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DIFFUSION, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_REVERB_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_REVERB_GAIN);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_GAIN, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_REVERB_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_REVERB_GAINHF);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_GAINHF, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_REVERB_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_REVERB_DECAY_TIME);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DECAY_TIME, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_REVERB_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_REVERB_DECAY_HFRATIO);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DECAY_HFRATIO, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_REVERB_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_REVERB_REFLECTIONS_GAIN);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_REFLECTIONS_GAIN, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_REVERB_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_REVERB_REFLECTIONS_DELAY);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_REFLECTIONS_DELAY, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_REVERB_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_REVERB_LATE_REVERB_GAIN);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_LATE_REVERB_GAIN, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_REVERB_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_REVERB_LATE_REVERB_DELAY);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_LATE_REVERB_DELAY, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_REVERB_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_REVERB_AIR_ABSORPTION_GAINHF);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_AIR_ABSORPTION_GAINHF, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_REVERB_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_REVERB_ROOM_ROLLOFF_FACTOR);
|
||||
set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_ROOM_ROLLOFF_FACTOR, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets <c>AL_REVERB_DECAY_HFLIMIT</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// range 0 to 1; default 1.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public bool DecayHfLimit
|
||||
{
|
||||
get => Al.GetEffecti(Effect.Name, AL_REVERB_DECAY_HFLIMIT) != AL_FALSE;
|
||||
set => Al.PInvoke.Effecti(Effect.Name, AL_REVERB_DECAY_HFLIMIT, value ? AL_TRUE : AL_FALSE);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the standard-reverb subset of a full EAX reverb parameter set (e.g. a <see cref="ReverbPreset"/> value); the EAX-only fields (pans, LF, echo, modulation) are ignored.
|
||||
/// </summary>
|
||||
public void Set(in ReverbProperties properties)
|
||||
{
|
||||
Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DENSITY, properties.Density);
|
||||
Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DIFFUSION, properties.Diffusion);
|
||||
Al.PInvoke.Effectf(Effect.Name, AL_REVERB_GAIN, properties.Gain);
|
||||
Al.PInvoke.Effectf(Effect.Name, AL_REVERB_GAINHF, properties.GainHf);
|
||||
Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DECAY_TIME, properties.DecayTime);
|
||||
Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DECAY_HFRATIO, properties.DecayHfRatio);
|
||||
Al.PInvoke.Effectf(Effect.Name, AL_REVERB_REFLECTIONS_GAIN, properties.ReflectionsGain);
|
||||
Al.PInvoke.Effectf(Effect.Name, AL_REVERB_REFLECTIONS_DELAY, properties.ReflectionsDelay);
|
||||
Al.PInvoke.Effectf(Effect.Name, AL_REVERB_LATE_REVERB_GAIN, properties.LateReverbGain);
|
||||
Al.PInvoke.Effectf(Effect.Name, AL_REVERB_LATE_REVERB_DELAY, properties.LateReverbDelay);
|
||||
Al.PInvoke.Effectf(Effect.Name, AL_REVERB_AIR_ABSORPTION_GAINHF, properties.AirAbsorptionGainHf);
|
||||
Al.PInvoke.Effectf(Effect.Name, AL_REVERB_ROOM_ROLLOFF_FACTOR, properties.RoomRolloffFactor);
|
||||
Al.PInvoke.Effecti(Effect.Name, AL_REVERB_DECAY_HFLIMIT, properties.DecayHfLimit ? AL_TRUE : AL_FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
3403
Brutal.OpenAl/Generated/Al/Efx/ReverbPreset.gen.cs
Normal file
3403
Brutal.OpenAl/Generated/Al/Efx/ReverbPreset.gen.cs
Normal file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue