예제 #1
0
파일: rtlsdr.go 프로젝트: nlefler/gortlsdr
// Set the intermediate frequency gain for the device.
//
// Intermediate frequency gain stage number (1 to 6 for E4000).
// Gain values are in tenths of dB, e.g. 115 means 11.5 dB.
//
// int rtlsdr_set_tuner_if_gain(rtlsdr_dev_t *dev, int stage, int gain);
// rtlsdr_set_tuner_if_gain returns 0 on success
func (c *Context) SetTunerIfGain(stage, gain int) (err int) {
	return int(C.rtlsdr_set_tuner_if_gain((*C.rtlsdr_dev_t)(c.dev),
		C.int(stage),
		C.int(gain)))
}
예제 #2
0
파일: rtlsdr.go 프로젝트: cyoung/gortlsdr
// SetTunerIfGain sets the intermediate frequency gain.
//
// Intermediate frequency gain stage number 1 to 6.
// Gain values are in tenths of dB, e.g. -30 means -3.0 dB.
func (dev *Context) SetTunerIfGain(stage, gainTenthsDb int) (err error) {
	i := int(C.rtlsdr_set_tuner_if_gain((*C.rtlsdr_dev_t)(dev),
		C.int(stage),
		C.int(gainTenthsDb)))
	return libError(i)
}