Skip to content

Commit

Permalink
Merge pull request #1048 from gqrx-sdr/revert-1036-fix_1030_1018
Browse files Browse the repository at this point in the history
Revert "Fix #1018"
  • Loading branch information
argilo authored Jan 8, 2022
2 parents 7a4e699 + a3f79da commit ae72d8a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
2 changes: 0 additions & 2 deletions resources/news.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
NEW: Save & restore center frequency when playing I/Q files.
FIXED: Device selection fails for some SoapySDR devices.
FIXED: Segfault when starting AppImage on some systems.
FIXED: Waterfall & sound stop working after playing invalid I/Q file.
FIXED: Crash when using I/Q playback and audio recording simultaneously.
IMPROVED: Frequency accuracy of plots at high zoom levels.


Expand Down
26 changes: 20 additions & 6 deletions src/applications/gqrx/receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,19 @@ void receiver::set_input_device(const std::string device)
src = osmosdr::source::make("file="+escape_filename(get_zero_file())+",freq=428e6,rate=96000,repeat=true,throttle=true");
}

set_demod(d_demod, true);
if(src->get_sample_rate() != 0)
set_input_rate(src->get_sample_rate());

if (d_decim >= 2)
{
tb->connect(src, 0, input_decim, 0);
tb->connect(input_decim, 0, iq_swap, 0);
}
else
{
tb->connect(src, 0, iq_swap, 0);
}

if (d_running)
tb->start();

Expand Down Expand Up @@ -1317,7 +1326,6 @@ void receiver::connect_all(rx_chain type)

if (d_dc_cancel)
{
dc_corr = make_dc_corr_cc(d_decim_rate, 1.0);
tb->connect(b, 0, dc_corr, 0);
b = dc_corr;
}
Expand All @@ -1326,19 +1334,25 @@ void receiver::connect_all(rx_chain type)
tb->connect(b, 0, iq_fft, 0);

// RX demod chain
rx.reset();
switch (type)
{
case RX_CHAIN_NBRX:
rx = make_nbrx(d_quad_rate, d_audio_rate);
if (rx->name() != "NBRX")
{
rx.reset();
rx = make_nbrx(d_quad_rate, d_audio_rate);
}
break;

case RX_CHAIN_WFMRX:
rx = make_wfmrx(d_quad_rate, d_audio_rate);
if (rx->name() != "WFMRX")
{
rx.reset();
rx = make_wfmrx(d_quad_rate, d_audio_rate);
}
break;

default:
rx = make_nbrx(d_quad_rate, d_audio_rate);
break;
}

Expand Down

0 comments on commit ae72d8a

Please sign in to comment.