//
// Generated by Brutal.OpenAl.Generate; do not edit by hand.
#nullable enable
using static Brutal.OpenAlApi.Al.Constants;
namespace Brutal.OpenAlApi
{
///
/// The typed parameter surface of an AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT effect (see ); requires ALC_EXT_EFX. Provided by ALC_EXT_DEDICATED.
///
public unsafe readonly partial struct DedicatedLowFrequencyEffect
{
///
/// The underlying effect handle.
///
public readonly AlEffect Effect;
///
/// Wraps an effect handle without validating its type; prefer the checked conversion.
///
public DedicatedLowFrequencyEffect(AlEffect effect) => Effect = effect;
///
/// The wrapper converts freely to its underlying handle.
///
public static implicit operator AlEffect(DedicatedLowFrequencyEffect effect) => effect.Effect;
///
/// Converts a raw handle to the typed wrapper, checking .
///
///
/// The effect's type is not .
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."
);
///
/// Deletes the underlying effect ().
///
public void Delete() => Effect.Delete();
///
/// Gets/sets AL_DEDICATED_GAIN.
///
public float Gain
{
get => Al.GetEffectf(Effect.Name, AL_DEDICATED_GAIN);
set => Al.PInvoke.Effectf(Effect.Name, AL_DEDICATED_GAIN, value);
}
}
}