mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
45 lines
1.1 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|