brutal/Brutal.OpenAl/Manual/Efx.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

45 lines
1.1 KiB
C#

namespace Brutal.OpenAlApi;
public sealed partial class Efx
{
internal Device Device { get; }
internal Efx(Device device) => Device = device;
// Device.Reset/Reopen invalidate the send count; the versions never change.
private int? _efxMajorVersion;
private int? _efxMinorVersion;
private int? _maxAuxiliarySends;
internal void InvalidateDeviceCaches() => _maxAuxiliarySends = null;
public int EfxMajorVersion
{
get
{
Device.ThrowIfDisposed();
var device = Device.Handle;
return _efxMajorVersion ??= Alc.GetInteger(device, AlcInteger.EfxMajorVersion);
}
}
public int EfxMinorVersion
{
get
{
Device.ThrowIfDisposed();
var device = Device.Handle;
return _efxMinorVersion ??= Alc.GetInteger(device, AlcInteger.EfxMinorVersion);
}
}
public int MaxAuxiliarySends
{
get
{
Device.ThrowIfDisposed();
var device = Device.Handle;
return _maxAuxiliarySends ??= Alc.GetInteger(device, AlcInteger.MaxAuxiliarySends);
}
}
}