X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fleqm-nrt.c;h=3543d67ad0f1c90656ea18e287b1e13dfff85238;hb=d2b679165414fba8717d4a58b2ec5a5fd3377f51;hp=9cd8a5357dce3c576965a8bd1c8d7751794bf1aa;hpb=4eacce11313a850228cd7f14ef67c27c7de78428;p=leqm-nrt.git 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 \tNumber of interpolation points for the filter. Default 64\n-numcpus \tNumber of slave threads to speed up operation.\n-timing \t\t\tFor benchmarking speed.\n-chconfcal \n-logleqm10\n-logleqm\n-buffersize \n"; + { const char helptext[] = "Order of parameters is free.\nPossible parameters are:\n-convpoints \tNumber of interpolation points for the filter. Default 64\n-numcpus \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 \n-logleqm10\n-logleqm\n-buffersize \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.