diff options
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r-- | src/DabMod.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp index f97c05d..15cdbaa 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -56,6 +56,7 @@ #include "output/SDR.h" #include "output/UHD.h" #include "output/Soapy.h" +#include "output/Dexter.h" #include "output/Lime.h" #include "output/BladeRF.h" #include "OutputZeroMQ.h" @@ -151,6 +152,11 @@ static void printModSettings(const mod_settings_t& mod_settings) mod_settings.sdr_device_config.masterClockRate << "\n"; } #endif +#if defined(HAVE_DEXTER) + else if (mod_settings.useDexterOutput) { + ss << " PrecisionWave DEXTER\n"; + } +#endif #if defined(HAVE_LIMESDR) else if (mod_settings.useLimeOutput) { ss << " LimeSDR\n" @@ -192,8 +198,7 @@ static void printModSettings(const mod_settings_t& mod_settings) fprintf(stderr, "%s", ss.str().c_str()); } -static shared_ptr<ModOutput> prepare_output( - mod_settings_t& s) +static shared_ptr<ModOutput> prepare_output(mod_settings_t& s) { shared_ptr<ModOutput> output; @@ -249,6 +254,16 @@ static shared_ptr<ModOutput> prepare_output( rcs.enrol((Output::SDR*)output.get()); } #endif +#if defined(HAVE_DEXTER) + else if (s.useDexterOutput) { + /* We normalise specifically range [-32768; 32767] */ + s.normalise = 32767.0f / normalise_factor; + s.sdr_device_config.sampleRate = s.outputRate; + auto dexterdevice = make_shared<Output::Dexter>(s.sdr_device_config); + output = make_shared<Output::SDR>(s.sdr_device_config, dexterdevice); + rcs.enrol((Output::SDR*)output.get()); + } +#endif #if defined(HAVE_LIMESDR) else if (s.useLimeOutput) { /* We normalise the same way as for the UHD output */ @@ -319,6 +334,7 @@ int launch_modulator(int argc, char* argv[]) mod_settings.useUHDOutput or mod_settings.useZeroMQOutput or mod_settings.useSoapyOutput or + mod_settings.useDexterOutput or mod_settings.useLimeOutput or mod_settings.useBladeRFOutput)) { throw std::runtime_error("Configuration error: Output not specified"); @@ -333,9 +349,9 @@ int launch_modulator(int argc, char* argv[]) mod_settings.fileOutputFormat == "s16")) { format_converter = make_shared<FormatConverter>(mod_settings.fileOutputFormat); } - else if (mod_settings.useBladeRFOutput) { - format_converter = make_shared<FormatConverter>(mod_settings.BladeRFOutputFormat); - } + else if (mod_settings.useBladeRFOutput or mod_settings.useDexterOutput) { + format_converter = make_shared<FormatConverter>("s16"); + } auto output = prepare_output(mod_settings); |