using System; using System.Runtime.InteropServices; namespace Susurrus.XAudio2 { /// /// The XAUDIO2_VOICE_STATE that a source voice reports about its queue. /// // xaudio2.h packs every struct to one byte. On x64 that puts SamplesPlayed at offset 12, not 16. [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct XAudio2VoiceState { public const uint NoSamplesPlayed = 0x0100; public IntPtr CurrentBufferContext; public uint BuffersQueued; public ulong SamplesPlayed; } }