mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
72 lines
2.6 KiB
C#
72 lines
2.6 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.OpenAl.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
using static Brutal.OpenAlApi.Al.Constants;
|
|
|
|
namespace Brutal.OpenAlApi
|
|
{
|
|
/// <summary>
|
|
/// The typed parameter surface of an <c>AL_EFFECT_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);
|
|
}
|
|
}
|
|
}
|