forked from sdr/gr-osmosdr
make it play nice with windows
thanks to Hoernchen <la@tfc-server.de>
This commit is contained in:
parent
a8625f0290
commit
9ec656dc05
|
@ -362,10 +362,11 @@ osmosdr::gain_range_t osmosdr_src_c::get_gain_range( size_t chan )
|
|||
if (_dev) {
|
||||
int count = osmosdr_get_tuner_gains(_dev, NULL);
|
||||
if (count > 0) {
|
||||
int gains[ count ];
|
||||
int* gains = new int[ count ];
|
||||
count = osmosdr_get_tuner_gains(_dev, gains);
|
||||
for (int i = 0; i < count; i++)
|
||||
range += osmosdr::range_t( gains[i] / 10.0 );
|
||||
delete[] gains;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -413,10 +413,11 @@ osmosdr::gain_range_t rtl_source_c::get_gain_range( size_t chan )
|
|||
if (_dev) {
|
||||
int count = rtlsdr_get_tuner_gains(_dev, NULL);
|
||||
if (count > 0) {
|
||||
int gains[ count ];
|
||||
int* gains = new int[ count ];
|
||||
count = rtlsdr_get_tuner_gains(_dev, gains);
|
||||
for (int i = 0; i < count; i++)
|
||||
range += osmosdr::range_t( gains[i] / 10.0 );
|
||||
delete[] gains;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue