bunch of bugfix and new features

This commit is contained in:
AlexandreRouma
2022-11-12 02:19:53 +01:00
parent c4bac3b298
commit 1c373e9cdb
22 changed files with 219 additions and 59 deletions

View File

@ -80,7 +80,11 @@ int sdrpp_main(int argc, char* argv[]) {
bool serverMode = (bool)core::args["server"];
#ifdef _WIN32
// Free console if the user hasn't asked for a console and not in server mode
if (!core::args["con"].b() && !serverMode) { FreeConsole(); }
// Set error mode to avoid abnoxious popups
SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS);
#endif
// Check root directory
@ -168,8 +172,12 @@ int sdrpp_main(int argc, char* argv[]) {
defConfig["moduleInstances"]["File Source"]["enabled"] = true;
defConfig["moduleInstances"]["HackRF Source"]["module"] = "hackrf_source";
defConfig["moduleInstances"]["HackRF Source"]["enabled"] = true;
defConfig["moduleInstances"]["Hermes Source"]["module"] = "hermes_source";
defConfig["moduleInstances"]["Hermes Source"]["enabled"] = true;
defConfig["moduleInstances"]["LimeSDR Source"]["module"] = "limesdr_source";
defConfig["moduleInstances"]["LimeSDR Source"]["enabled"] = true;
defConfig["moduleInstances"]["PlutoSDR Source"]["module"] = "plutosdr_source";
defConfig["moduleInstances"]["PlutoSDR Source"]["enabled"] = true;
defConfig["moduleInstances"]["RFspace Source"]["module"] = "rfspace_source";
defConfig["moduleInstances"]["RFspace Source"]["enabled"] = true;
defConfig["moduleInstances"]["RTL-SDR Source"]["module"] = "rtl_sdr_source";
@ -184,8 +192,6 @@ int sdrpp_main(int argc, char* argv[]) {
defConfig["moduleInstances"]["SoapySDR Source"]["enabled"] = true;
defConfig["moduleInstances"]["SpyServer Source"]["module"] = "spyserver_source";
defConfig["moduleInstances"]["SpyServer Source"]["enabled"] = true;
defConfig["moduleInstances"]["PlutoSDR Source"]["module"] = "plutosdr_source";
defConfig["moduleInstances"]["PlutoSDR Source"]["enabled"] = true;
defConfig["moduleInstances"]["Audio Sink"] = "audio_sink";
defConfig["moduleInstances"]["Network Sink"] = "network_sink";

View File

@ -37,7 +37,7 @@ namespace dsp::compression {
if (pcmType == PCMType::PCM_TYPE_F32) {
*scaler = 0;
memcpy(dataBuf, in, count * sizeof(complex_t));
return count;
return 8 + (count * sizeof(complex_t));
}
// Find maximum value

View File

@ -171,4 +171,4 @@ namespace dsp::multirate {
double _outSamplerate;
Mode mode;
};
}
}

View File

@ -6,6 +6,8 @@
template <class K, class T>
class OptionList {
public:
OptionList() { updateText(); }
void define(K key, std::string name, T value) {
if (keyExists(key)) { throw std::runtime_error("Key already exists"); }
if (nameExists(name)) { throw std::runtime_error("Name already exists"); }