Exemple #1
0
// GetTunerGain gets the actual gian the device is configured to
func (dev *Radio) GetTunerGain() (int, error) {
	retval := C.rtlsdr_get_tuner_gain(dev.devptr)

	if retval == 0 {
		return 0, fmt.Errorf("rtlsdr_get_tuner_gain encountered an error")
	}
	return int(retval), nil
}
Exemple #2
0
// Get actual gain the device is configured to.
//
// Gain values are in tenths of dB, e.g. 115 means 11.5 dB.
//
// int rtlsdr_get_tuner_gain(rtlsdr_dev_t *dev);
// rtlsdr_get_tuner_gain returns 0 on error or the gain in tenths of a dB
func (c *Context) GetTunerGain() (gain int) {
	return int(C.rtlsdr_get_tuner_gain((*C.rtlsdr_dev_t)(c.dev)))
}
Exemple #3
0
// GetTunerGain returns the tuner gain.
//
// Gain values are in tenths of dB, e.g. 115 means 11.5 dB.
func (dev *Context) GetTunerGain() (gainTenthsDb int) {
	return int(C.rtlsdr_get_tuner_gain((*C.rtlsdr_dev_t)(dev)))
}