mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-27 21:48:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue