jj1bdx / airspy-fmradion

Software decoder for FM/AM broadcast radio with AirSpy R2 / Mini, Airspy HF+, and RTL-SDR
GNU General Public License v3.0
138 stars 19 forks source link

Setting sample rates #5

Closed touil closed 5 years ago

touil commented 5 years ago

The actual sample rate should be used instead of the index: m_srates[sampleRateIndex]

https://github.com/jj1bdx/airspy-fmradion/blob/2cfb75aea169a698b2cf160e0f99e90aa4019682/sfmbase/AirspyHFSource.cpp#L176

jj1bdx commented 5 years ago

@touil Fixed here -> https://github.com/jj1bdx/airspy-fmradion/commit/56c8bb9ea873dc26dad73e537b2342d2760da20f#diff-abdbc58a22fffed9e1d3d31c81280833R178

BTW airspyhf_set_samplerate() accepts both the index and the sample rate. See https://github.com/airspy/airspyhf/blob/master/libairspyhf/src/airspyhf.c#L1041L1051 for the details; this part of the code actually converts the given sample rate into the table index. Nevertheless, I've followed your advice.