diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-11-02 14:11:26 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-11-02 14:11:26 +0100 |
commit | 450c1e1d29a08326f4a370005bacafd528cd25e7 (patch) | |
tree | d9c21863bf6c1c0e2024203a5e1f1731f7e36f18 /src/DabMod.cpp | |
parent | 1c5372335338962ccbe9e876467b7e0ea46877ac (diff) | |
download | dabmod-450c1e1d29a08326f4a370005bacafd528cd25e7.tar.gz dabmod-450c1e1d29a08326f4a370005bacafd528cd25e7.tar.bz2 dabmod-450c1e1d29a08326f4a370005bacafd528cd25e7.zip |
Create new SDR output abstraction and port Soapy
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r-- | src/DabMod.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp index 2caba5d..b810f20 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -36,11 +36,12 @@ #include "InputMemory.h" #include "OutputFile.h" #include "FormatConverter.h" +#include "output/SDR.h" #if defined(HAVE_OUTPUT_UHD) # include "OutputUHD.h" #endif #if defined(HAVE_SOAPYSDR) -# include "OutputSoapy.h" +# include "output/Soapy.h" #endif #include "OutputZeroMQ.h" #include "InputReader.h" @@ -155,8 +156,8 @@ static void printModSettings(const mod_settings_t& mod_settings) fprintf(stderr, " SoapySDR\n" " Device: %s\n" " master_clock_rate: %ld\n", - mod_settings.outputsoapy_conf.device.c_str(), - mod_settings.outputsoapy_conf.masterClockRate); + mod_settings.sdr_device_config.device.c_str(), + mod_settings.sdr_device_config.masterClockRate); } #endif else if (mod_settings.useZeroMQOutput) { @@ -219,9 +220,10 @@ static shared_ptr<ModOutput> prepare_output( else if (s.useSoapyOutput) { /* We normalise the same way as for the UHD output */ s.normalise = 1.0f / normalise_factor; - s.outputsoapy_conf.sampleRate = s.outputRate; - output = make_shared<OutputSoapy>(s.outputsoapy_conf); - rcs.enrol((OutputSoapy*)output.get()); + s.sdr_device_config.sampleRate = s.outputRate; + auto soapydevice = make_shared<Output::Soapy>(s.sdr_device_config); + output = make_shared<Output::SDR>(s.sdr_device_config, soapydevice); + rcs.enrol((Output::SDR*)output.get()); } #endif #if defined(HAVE_ZEROMQ) @@ -334,7 +336,7 @@ int launch_modulator(int argc, char* argv[]) #endif #if defined(HAVE_SOAPYSDR) if (mod_settings.useSoapyOutput) { - ((OutputSoapy*)output.get())->setETISource(modulator->getEtiSource()); + ((Output::SDR*)output.get())->setETISource(modulator->getEtiSource()); } #endif @@ -428,7 +430,7 @@ int launch_modulator(int argc, char* argv[]) #endif #if defined(HAVE_SOAPYSDR) if (mod_settings.useSoapyOutput) { - ((OutputSoapy*)output.get())->setETISource(modulator->getEtiSource()); + ((Output::SDR*)output.get())->setETISource(modulator->getEtiSource()); } #endif |