mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-10-01 12:30:00 +02:00
7b66cb0d90
* audio: Cleanup SoundIO and fix OpenAL issue * fix tabs by spaces * Fix extra spaces * Fix SoundIO.cs * Fix ContainsAudioOutBuffer
34 lines
No EOL
871 B
C#
34 lines
No EOL
871 B
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace SoundIOSharp
|
|
{
|
|
public struct SoundIOChannelAreas
|
|
{
|
|
static readonly int native_size = Marshal.SizeOf<SoundIoChannelArea>();
|
|
|
|
internal SoundIOChannelAreas(IntPtr head, int channelCount, int frameCount)
|
|
{
|
|
this.head = head;
|
|
this.channel_count = channelCount;
|
|
this.frame_count = frameCount;
|
|
}
|
|
|
|
IntPtr head;
|
|
int channel_count;
|
|
int frame_count;
|
|
|
|
public bool IsEmpty
|
|
{
|
|
get { return head == IntPtr.Zero; }
|
|
}
|
|
|
|
public SoundIOChannelArea GetArea(int channel)
|
|
{
|
|
return new SoundIOChannelArea(head + native_size * channel);
|
|
}
|
|
|
|
public int ChannelCount => channel_count;
|
|
public int FrameCount => frame_count;
|
|
}
|
|
} |