tunerGains property
Get a list of all gains supported by the tuner in dB.
Implementation
List<double> get tunerGains {
RtlSdrException.checkOpen(this);
final count = bindings.getTunerGains(handle, nullptr);
if (count > 0) {
final gains = malloc<Int>(count);
try {
final result = bindings.getTunerGains(handle, gains);
RtlSdrException.checkError(result, 'Failed to get tuner gains');
return List.generate(
result, (index) => gains.elementAt(index).value / 10.0,
growable: false);
} finally {
malloc.free(gains);
}
}
throw RtlSdrException('Failed to get tuner gain count: $count');
}