Exemplo n.º 1
0
// Enable or disable the direct sampling mode. When enabled, the IF mode
// of the RTL2832 is activated, and rtlsdr_set_center_freq() will control
// the IF-frequency of the DDC, which can be used to tune from 0 to 28.8 MHz
// (xtal frequency of the RTL2832).
//
// Sampling modes, 0: disabled, 1: I-ADC input enabled, 2: Q-ADC input enabled
//
// int rtlsdr_set_direct_sampling(rtlsdr_dev_t *dev, int on);
// rtlsdr_set_direct_sampling returns 0 on success
func (c *Context) SetDirectSampling(on int) (err int) {
	return int(C.rtlsdr_set_direct_sampling((*C.rtlsdr_dev_t)(c.dev),
		C.int(on)))
}
Exemplo n.º 2
0
// SetDirectSampling sets the direct sampling mode.
//
// When enabled, the IF mode of the device is activated, and
// SetCenterFreq() will control the IF-frequency of the DDC, which
// can be used to tune from 0 to 28.8 MHz (xtal frequency of the device).
func (dev *Context) SetDirectSampling(mode SamplingMode) (err error) {
	i := int(C.rtlsdr_set_direct_sampling((*C.rtlsdr_dev_t)(dev),
		C.int(mode)))
	return libError(i)
}