コード例 #1
0
ファイル: Source.cs プロジェクト: bonomali/Ibasa
        public void Queue(Buffer buffer)
        {
            AlHelper.ThrowNullException(Id);
            if (buffer == Buffer.Null)
            {
                throw new ArgumentNullException("buffer");
            }

            unsafe
            {
                uint bid = buffer.Id;
                Al.SourceQueueBuffers(Id, 1, &bid);
            }
        }
コード例 #2
0
ファイル: Source.cs プロジェクト: bonomali/Ibasa
        public void Queue(Buffer[] buffers)
        {
            AlHelper.ThrowNullException(Id);
            if (buffers == null)
            {
                throw new ArgumentNullException("buffers");
            }

            unsafe
            {
                uint *bids = stackalloc uint[buffers.Length];
                for (int i = 0; i < buffers.Length; ++i)
                {
                    bids[i] = buffers[i].Id;
                }
                Al.SourceQueueBuffers(Id, buffers.Length, bids);
            }
        }