コード例 #1
0
ファイル: Out123.cs プロジェクト: luca1337/aiv-mpg123
        public ulong Play(byte[] buffer)
        {
            IntPtr bufferPtr = Marshal.AllocHGlobal(Marshal.SizeOf <byte>() * buffer.Length);

            Marshal.Copy(buffer, 0, bufferPtr, buffer.Length);
            UIntPtr size = Out123NativeMethods.Play(handle, bufferPtr, new UIntPtr((ulong)buffer.Length));

            Marshal.FreeHGlobal(bufferPtr);
            return(size.ToUInt64());
        }