mirror of
https://github.com/JS8Call-improved/JS8Call-improved
synced 2026-08-13 17:47:36 -04:00
Move gran() to Modulator implementation file
This function is used only by the Modulator, and even then, only when testing.
This commit is contained in:
parent
5d90376271
commit
b60e019874
4 changed files with 12 additions and 22 deletions
|
|
@ -210,7 +210,6 @@ set (wsjtx_CXXSRCS
|
|||
Detector.cpp
|
||||
logqso.cpp
|
||||
decodedtext.cpp
|
||||
getfile.cpp
|
||||
soundout.cpp
|
||||
soundin.cpp
|
||||
signalmeter.cpp
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <random>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QRandomGenerator>
|
||||
|
|
@ -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<float> d;
|
||||
return d(*QRandomGenerator::global());
|
||||
}
|
||||
|
||||
unsigned
|
||||
delayMS(qint32 const trPeriod)
|
||||
{
|
||||
|
|
|
|||
10
getfile.cpp
10
getfile.cpp
|
|
@ -1,10 +0,0 @@
|
|||
#include "getfile.h"
|
||||
#include <random>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
/* Generate gaussian random float with mean=0 and std_dev=1 */
|
||||
float gran()
|
||||
{
|
||||
static std::normal_distribution<float> d;
|
||||
return d (*QRandomGenerator::global ());
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
// -*- Mode: C++ -*-
|
||||
#ifndef GETFILE_H
|
||||
#define GETFILE_H
|
||||
#include <QDebug>
|
||||
|
||||
float gran();
|
||||
|
||||
#endif // GETFILE_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue