Ejemplo n.º 1
0
        public void BufferData(Format format, IntPtr data, int size, int frequency)
        {
            AlHelper.ThrowNullException(Id);
            if (data == IntPtr.Zero)
            {
                throw new ArgumentNullException("data");
            }

            unsafe
            {
                uint id = Id;
                Al.BufferData(Id, (int)format, data.ToPointer(), size, frequency);
            }
        }
Ejemplo n.º 2
0
        public void BufferData(Format format, byte[] data, int size, int frequency)
        {
            AlHelper.ThrowNullException(Id);
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            unsafe
            {
                fixed(byte *pointer = data)
                {
                    uint id = Id;

                    Al.BufferData(Id, (int)format, pointer, size, frequency);
                }
            }
        }