summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-04-18 22:52:52 +0200
committerCarl Hetherington <cth@carlh.net>2020-04-20 00:31:10 +0200
commiteec0d22310abbec866f7fb2cb78678f1c812ccc7 (patch)
tree601f49bfe448df3f2805657484425e00c8c099d5 /src
parentf876718236e0ec243bd7bc2265d27714a83b4375 (diff)
And samplingfreq.
Diffstat (limited to 'src')
-rw-r--r--src/leqm-nrt.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/leqm-nrt.cc b/src/leqm-nrt.cc
index 6ce2940..0749e1f 100644
--- a/src/leqm-nrt.cc
+++ b/src/leqm-nrt.cc
@@ -263,13 +263,12 @@ void * worker_function(void * argfunc);
void logleqm(FILE * filehandle, double featuretimesec, Sum * oldsum);
void logleqm10(FILE * filehandle, double featuretimesec, double longaverage);
-int calculate(std::vector<double> channel_corrections, std::string sound_filename, int leqmlog, int leqm10, int timing, int numbershortperiods, int buffersizems, int numCPU, int samplingfreq, int npoints, int origpoints, int leqnw);
+int calculate(std::vector<double> channel_corrections, std::string sound_filename, int leqmlog, int leqm10, int timing, int numbershortperiods, int buffersizems, int numCPU, int npoints, int origpoints, int leqnw);
int main(int argc, const char ** argv)
{
int npoints = 64; // This value is low for precision. Calibration is done with 32768 point.
int origpoints = 21; //number of points in the standard CCIR filter
- int samplingfreq; // this and the next is defined later taking it from sound file
// double normalizer;
int timing = 0;
int fileopenstate = 0;
@@ -393,10 +392,10 @@ int main(int argc, const char ** argv)
}
}
- return calculate(channel_corrections, sound_filename, leqmlog, leqm10, timing, numbershortperiods, buffersizems, numCPU, samplingfreq, npoints, origpoints, leqnw);
+ return calculate(channel_corrections, sound_filename, leqmlog, leqm10, timing, numbershortperiods, buffersizems, numCPU, npoints, origpoints, leqnw);
}
-int calculate(std::vector<double> channel_corrections, std::string sound_filename, int leqmlog, int leqm10, int timing, int numbershortperiods, int buffersizems, int numCPU, int samplingfreq, int npoints, int origpoints, int leqnw)
+int calculate(std::vector<double> channel_corrections, std::string sound_filename, int leqmlog, int leqm10, int timing, int numbershortperiods, int buffersizems, int numCPU, int npoints, int origpoints, int leqnw)
{
FILE *leqm10logfile = nullptr;
FILE *leqmlogfile = nullptr;
@@ -464,7 +463,7 @@ int calculate(std::vector<double> channel_corrections, std::string sound_filenam
int buffer_size_samples = (sf_info.samplerate*sf_info.channels*buffersizems)/1000;
buffer = new double[buffer_size_samples];
- samplingfreq = sf_info.samplerate;
+ int samplingfreq = sf_info.samplerate;
if(leqm10) {