diff --git a/CMakeLists.txt b/CMakeLists.txt index 97419436..4974ba8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,7 +210,6 @@ set (wsjtx_CXXSRCS Detector.cpp logqso.cpp decodedtext.cpp - getfile.cpp soundout.cpp soundin.cpp signalmeter.cpp diff --git a/Modulator.cpp b/Modulator.cpp index e046be00..90b16004 100644 --- a/Modulator.cpp +++ b/Modulator.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -13,12 +14,20 @@ #include "moc_Modulator.cpp" -extern float gran(); // Noise generator (for tests only) - namespace { constexpr double TAU = 2 * M_PI; - + + // Noise generator, for tests only; generate gaussian random + // float with mean = 0 and std_dev = 1. + + float + gran() + { + static std::normal_distribution d; + return d(*QRandomGenerator::global()); + } + unsigned delayMS(qint32 const trPeriod) { diff --git a/getfile.cpp b/getfile.cpp deleted file mode 100644 index 5e85f05e..00000000 --- a/getfile.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "getfile.h" -#include -#include - -/* Generate gaussian random float with mean=0 and std_dev=1 */ -float gran() -{ - static std::normal_distribution d; - return d (*QRandomGenerator::global ()); -} diff --git a/getfile.h b/getfile.h deleted file mode 100644 index c79b9f30..00000000 --- a/getfile.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- Mode: C++ -*- -#ifndef GETFILE_H -#define GETFILE_H -#include - -float gran(); - -#endif // GETFILE_H