diff options
| author | Luca Trisciani <luca.trisciani@gmail.com> | 2018-11-05 12:09:21 +0100 |
|---|---|---|
| committer | Luca Trisciani <luca.trisciani@gmail.com> | 2018-11-05 12:09:21 +0100 |
| commit | d2b679165414fba8717d4a58b2ec5a5fd3377f51 (patch) | |
| tree | ecc9af323cdca26e6f11cb224059f61a427c69a4 | |
| parent | 4eacce11313a850228cd7f14ef67c27c7de78428 (diff) | |
Changed version to 0.18, added Leq(nW) switch
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | src/leqm-nrt.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 7473ba8..c9972ee 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([leqm-nrt], [0.17], [luca.trisciani@dcp-werkstatt.ch]) +AC_INIT([leqm-nrt], [0.18], [luca.trisciani@dcp-werkstatt.ch]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PROG_CC AC_CONFIG_HEADERS([config.h]) diff --git a/src/leqm-nrt.c b/src/leqm-nrt.c index 9cd8a53..3543d67 100644 --- a/src/leqm-nrt.c +++ b/src/leqm-nrt.c @@ -147,7 +147,7 @@ int main(int argc, const char ** argv) if (argc == 1) - { const char helptext[] = "Order of parameters is free.\nPossible parameters are:\n-convpoints <integer number> \tNumber of interpolation points for the filter. Default 64\n-numcpus <integer number> \tNumber of slave threads to speed up operation.\n-timing \t\t\tFor benchmarking speed.\n-chconfcal <db correction> <db correction> <etc. so many times as channels>\n-logleqm10\n-logleqm\n-buffersize <milliseconds>\n"; + { const char helptext[] = "Order of parameters is free.\nPossible parameters are:\n-convpoints <integer number> \tNumber of interpolation points for the filter. Default 64\n-numcpus <integer number> \tNumber of slave threads to speed up operation.\n-timing \t\t\tFor benchmarking speed.\n-leqnw\t Print out Leq without M Weighting\n-chconfcal <db correction> <db correction> <etc. so many times as channels>\n-logleqm10\n-logleqm\n-buffersize <milliseconds>\n"; printf(helptext); printf("Please indicate a sound file to be processed.\n"); return 0; @@ -416,7 +416,7 @@ int main(int argc, const char ** argv) #ifdef DEBUG for (int i=0; i < npoints; i++) { - printf("%d\t%.2f\t%.2f\t%.2f\n", i, eqfreqsamples[i], eqfreqresp_db[i], eqfreqresp[i]); + printf("%d\t%.2f\t%.2f\t%.6f\n", i, eqfreqsamples[i], eqfreqresp_db[i], eqfreqresp[i]); } #endif @@ -515,7 +515,7 @@ int main(int argc, const char ** argv) meanoverduration(totsum); if (leqnw) { - printf("Leq(noW): %.4f\n", totsum->rms); // Leq(no Weighting) + printf("Leq(nW): %.4f\n", totsum->rms); // Leq(no Weighting) } printf("Leq(M): %.4f\n", totsum->leqm); @@ -910,7 +910,7 @@ int sumsamples(struct Sum * ts, double * inputsamples, double * cinputsamples, i int meanoverduration(struct Sum * oldsum) { oldsum->mean = pow(oldsum->sum / ((double) oldsum->nsamples), 0.500); oldsum->cmean = pow(oldsum->csum / ((double) oldsum->nsamples), 0.500); - oldsum->rms = 20*log10(oldsum->mean); + oldsum->rms = 20*log10(oldsum->mean) + 108.0851; oldsum->leqm = 20*log10(oldsum->cmean) + 108.0851;// //This must be right because M filter is -5.6 @ 1k Hz that is -25.6 dBFS and to have 85.0 as reference level we must add 25.56 + 85.00 that is 110.6 dB. //this value is obtained calibrating with a -20 dBFS. |
