mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-28 22:18:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
45
Brutal.OpenAl/Manual/Efx.cs
Normal file
45
Brutal.OpenAl/Manual/Efx.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue