public Buffer Unqueue() { AlHelper.ThrowNullException(Id); unsafe { uint bid; Al.SourceUnqueueBuffers(Id, 1, &bid); return(new OpenAL.Buffer(bid)); } }
public Buffer[] Unqueue(int count) { AlHelper.ThrowNullException(Id); if (count <= 0) { throw new ArgumentException("count is less than or equal to 0.", "count"); } unsafe { uint *bids = stackalloc uint[count]; Al.SourceUnqueueBuffers(Id, count, bids); Buffer[] buffers = new Buffer[count]; for (int i = 0; i < count; ++i) { buffers[i] = new Buffer(bids[i]); } return(buffers); } }