Skip to content

Commit

Permalink
Remove gr-osmosdr dependency.This breaks i/q file playback feature
Browse files Browse the repository at this point in the history
  • Loading branch information
cozycactus committed Nov 14, 2024
1 parent 7b4420a commit 18cd1c2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ else()
endif()

include(FindPkgConfig)
find_package(Gnuradio-osmosdr REQUIRED)


set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG AUDIO BLOCKS DIGITAL FILTER FFT PMT SOAPY)
find_package(Gnuradio REQUIRED COMPONENTS analog audio blocks digital filter fft network soapy)
Expand Down
23 changes: 8 additions & 15 deletions src/applications/gqrx/receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

#include <gnuradio/prefs.h>
#include <gnuradio/top_block.h>
#include <osmosdr/source.h>

#include <gnuradio/soapy/source.h>
#include <osmosdr/ranges.h>

#include <SoapySDR/Device.hpp>

#include "applications/gqrx/receiver.h"
Expand Down Expand Up @@ -229,19 +229,10 @@ void receiver::set_input_device(const std::string device)
tb->disconnect(soapy_src, 0, iq_swap, 0);
}

#if GNURADIO_VERSION < 0x030802
//Work around GNU Radio bug #3184
//temporarily connect dummy source to ensure that previous device is closed
src = osmosdr::source::make("file="+escape_filename(get_zero_file())+",freq=428e6,rate=96000,repeat=true,throttle=true");
tb->connect(src, 0, iq_swap, 0);
tb->start();
tb->stop();
tb->wait();
tb->disconnect(src, 0, iq_swap, 0);
#else

//src.reset();
soapy_src.reset();
#endif


try
{
Expand Down Expand Up @@ -1305,8 +1296,10 @@ receiver::status receiver::stop_iq_recording()
receiver::status receiver::seek_iq_file(long pos)
{
receiver::status status = STATUS_OK;
status = STATUS_ERROR;
return status;

tb->lock();
/* tb->lock();
if (src->seek(pos, SEEK_SET))
{
Expand All @@ -1319,7 +1312,7 @@ receiver::status receiver::seek_iq_file(long pos)
tb->unlock();
return status;
return status; */
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/applications/gqrx/receiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <gnuradio/blocks/wavfile_sink.h>
#include <gnuradio/blocks/wavfile_source.h>
#include <gnuradio/top_block.h>
#include <osmosdr/source.h>

#include <gnuradio/soapy/source.h>
#include <string>

Expand Down Expand Up @@ -258,7 +258,7 @@ class receiver

gr::top_block_sptr tb; /*!< The GNU Radio top block. */

osmosdr::source::sptr src; /*!< Real time I/Q source. */
//osmosdr::source::sptr src; /*!< Real time I/Q source. */

gr::soapy::source::sptr soapy_src; /*!< SoapySDR source. */

Expand Down
4 changes: 1 addition & 3 deletions src/qtgui/ioconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
#include <QtGlobal>
#include <QVariant>

#include <osmosdr/device.h>
#include <osmosdr/source.h>
#include <osmosdr/ranges.h>


#include <SoapySDR/Device.hpp>

Expand Down

0 comments on commit 18cd1c2

Please sign in to comment.