public void Read(IntPtr buffer, int samples) { AlHelper.ThrowNullException(Handle); unsafe { Alc.CaptureSamples(Handle, buffer.ToPointer(), samples); AlHelper.GetAlcError(Alc.GetError(Handle)); } }
public void Read(byte[] buffer, int samples) { AlHelper.ThrowNullException(Handle); unsafe { fixed(byte *pointer = buffer) { Alc.CaptureSamples(Handle, pointer, samples); AlHelper.GetAlcError(Alc.GetError(Handle)); } } }