// SetAgcMode Enables or Disables the internal digital AGC of the RTL2832 func (dev *Radio) SetAgcMode(mode AgcMode) error { retval := C.rtlsdr_set_agc_mode(dev.devptr, C.int(mode)) if retval != 0 { return fmt.Errorf("rtlsdr_set_agc_mode returned error value: %d", retval) } return nil }
// SetAgcMode sets the AGC mode. func (dev *Context) SetAgcMode(AGCMode bool) (err error) { mode := 0 // AGC off if AGCMode { mode = 1 // AGC on } i := int(C.rtlsdr_set_agc_mode((*C.rtlsdr_dev_t)(dev), C.int(mode))) return libError(i) }
// Enable or disable the internal digital AGC of the RTL2832. // // Digital AGC mode, 1 means enabled, 0 disabled // // int rtlsdr_set_agc_mode(rtlsdr_dev_t *dev, int on); // rtlsdr_set_agc_mode returns 0 on success func (c *Context) SetAgcMode(on int) (err int) { return int(C.rtlsdr_set_agc_mode((*C.rtlsdr_dev_t)(c.dev), C.int(on))) }