// Close a handle to the RTLSDR device func (dev *Radio) Close() error { // RTLSDR_API int rtlsdr_close(rtlsdr_dev_t *dev); retval := C.rtlsdr_close(dev.devptr) if retval != 0 { defer dev.Cleanup() return fmt.Errorf("rtlsdr_close returned error value: %d", retval) } return nil }
// Close closes a previously opened device context. // // int rtlsdr_close(rtlsdr_dev_t *dev); // rtlsdr_close returns 0 on success func (c *Context) Close() (err int) { return int(C.rtlsdr_close((*C.rtlsdr_dev_t)(c.dev))) }
// Close closes the device. func (dev *Context) Close() (err error) { i := int(C.rtlsdr_close((*C.rtlsdr_dev_t)(dev))) return libError(i) }