private void determineAvailableSampleRates() throws LibUsbException, UsbException {
  mSampleRates.clear();
  try {
    byte[] rawCount=readArray(Command.GET_SAMPLE_RATES,0,0,4);
    if (rawCount != null) {
      int count=EndianUtils.readSwappedInteger(rawCount,0);
      byte[] rawRates=readArray(Command.GET_SAMPLE_RATES,0,count,(count * 4));
      for (int x=0; x < count; x++) {
        int rate=EndianUtils.readSwappedInteger(rawRates,(x * 4));
        mSampleRates.add(new AirspySampleRate(x,rate,formatSampleRate(rate)));
      }
    }
  }
 catch (  LibUsbException e) {
  }
  if (mSampleRates.isEmpty()) {
    mSampleRates.add(DEFAULT_SAMPLE_RATE);
  }
}

private void determineAvailableSampleRates ( ) throws LibUsbException , UsbException { mSampleRates . clear ( ) ; try { byte [ ] rawCount = readArray ( Command . GET_SAMPLE_RATES , 0 , 0 , 4 ) ; if ( rawCount != null ) { int count = EndianUtils . readSwappedInteger ( rawCount , 0 ) ; byte [ ] rawRates = readArray ( Command . GET_SAMPLE_RATES , 0 , count , ( count * 4 ) ) ; for ( int x = 0 ; x < count ; x ++ ) { int rate = EndianUtils . readSwappedInteger ( rawRates , ( x * 4 ) ) ; mSampleRates . add ( new AirspySampleRate ( x , rate , formatSampleRate ( rate ) ) ) ; } } } catch ( LibUsbException e ) { } if ( mSampleRates . isEmpty ( ) ) { mSampleRates . add ( DEFAULT_SAMPLE_RATE ) ; } }
queries the device for available sample rates . will always provide at least the default 10 mhz sample rate .
