mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
29
Brutal.OpenAl/Manual/AlSource.cs
Normal file
29
Brutal.OpenAl/Manual/AlSource.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
namespace Brutal.OpenAlApi;
|
||||
|
||||
public readonly unsafe partial struct AlSource
|
||||
{
|
||||
public void QueueBuffers(ReadOnlySpan<AlBuffer> buffers)
|
||||
{
|
||||
if (buffers.IsEmpty)
|
||||
return;
|
||||
|
||||
var names = MemoryMarshal.Cast<AlBuffer, uint>(buffers);
|
||||
fixed (uint* p = names)
|
||||
Al.PInvoke.SourceQueueBuffers(Name, names.Length, p);
|
||||
}
|
||||
|
||||
public void UnqueueBuffers(Span<AlBuffer> buffers)
|
||||
{
|
||||
if (buffers.IsEmpty)
|
||||
return;
|
||||
|
||||
var names = MemoryMarshal.Cast<AlBuffer, uint>(buffers);
|
||||
fixed (uint* p = names)
|
||||
Al.PInvoke.SourceUnqueueBuffers(Name, names.Length, p);
|
||||
}
|
||||
|
||||
public void SetAuxiliarySend(AlAuxiliaryEffectSlot slot, int send, AlFilter filter = default)
|
||||
{
|
||||
Al.PInvoke.Source3i(Name, Al.Constants.AL_AUXILIARY_SEND_FILTER, (int)slot.Name, send, (int)filter.Name);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue