Raw C librtlsdr device (typed as void)
Get USB device strings. Max size 256 bytes. Alike to rtljs.getDeviceUSBStrings(index)
.
manufacturer, product, and serial strings. They may all be null.
Read samples from the device asynchronously. This function will block until it is being canceled using cancelAsync()
Callback function to return received samples (buf:number[], len:number, ctx:void)
optional buffer count, buf_num * buf_len = overall buffer size set to 0 for default buffer count (15)
optional buffer length, must be multiple of 512, should be a multiple of 16384 (URB size), set to 0 for default buffer length (16 * 32 * 512)
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).
0 means disabled, 1 I-ADC input enabled, 2 Q-ADC input enabled
Set the sample rate for the device, also selects the baseband filters according to the requested sample rate for tuners where this is possible.
samp_rate the sample rate to be set, possible values are: 225001 - 300000 Hz 900001 - 3200000 Hz sample loss is to be expected for rates > 2400000
Set the gain for the device. Manual gain mode must be enabled for this to work.
Each device has a specific set of gains it supports. Gains are checked against pre-aquired array of gains by rtljs for validity.
Measured in tenths of a dB, 115 means 11.5 dB.
Set crystal oscillator frequencies used for the RTL2832 and the tuner IC.
Usually both ICs use the same clock. Changing the clock may make sense if you are applying an external clock to the tuner or to compensate the frequency (and samplerate) error caused by the original (cheap) crystal.
NOTE: Call this function only if you fully understand the implications.
Frequency value used to clock the RTL2832 in Hz
Frequency value used to clock the tuner IC in Hz
Opened RTLSDR device.
NOTE: Do not create an instance of this class directly (unless for some weird reason you want to provide a pure C dev* buffer)
Example