using System; using System.Runtime.InteropServices; namespace Raylib_cs { /// /// Wave type, defines audio wave data /// [StructLayout(LayoutKind.Sequential)] public struct Wave { /// /// Number of samples /// public uint sampleCount; /// /// Frequency (samples per second) /// public uint sampleRate; /// /// Bit depth (bits per sample): 8, 16, 32 (24 not supported) /// public uint sampleSize; /// /// Number of channels (1-mono, 2-stereo) /// public uint channels; /// /// Buffer data pointer (void *) /// public IntPtr data; } /// /// Audio stream type
/// NOTE: Useful to create custom audio streams not bound to a specific file ///
[StructLayout(LayoutKind.Sequential)] public struct AudioStream { /// /// Pointer to internal data(rAudioBuffer *) used by the audio system /// public IntPtr audioBuffer; /// /// Frequency (samples per second) /// public uint sampleRate; /// /// Bit depth (bits per sample): 8, 16, 32 (24 not supported) /// public uint sampleSize; /// /// Number of channels (1-mono, 2-stereo) /// public uint channels; } /// /// Sound source type /// [StructLayout(LayoutKind.Sequential)] public struct Sound { /// /// Audio stream /// public AudioStream stream; /// /// Total number of frames (considering channels) /// public uint frameCount; } /// /// Music stream type (audio file streaming from memory)
/// NOTE: Anything longer than ~10 seconds should be streamed ///
[StructLayout(LayoutKind.Sequential)] public struct Music { /// /// Audio stream /// public AudioStream stream; /// /// Total number of samples /// public uint frameCount; /// /// Music looping enable /// public byte looping; /// /// Type of music context (audio filetype) /// public int ctxType; /// /// Audio context data, depends on type (void *) /// public IntPtr ctxData; } }