int Read(object Buffer, int Length) { BassWasapi.CurrentDevice = DeviceIndex; GCHandle gch = GCHandle.Alloc(Buffer, GCHandleType.Pinned); int Return = BassWasapi.Read(gch.AddrOfPinnedObject(), Length); gch.Free(); return(Return); }