ГОСТ Р 56047—2014
mod = moddcff(processch1 .Modtest. processchl.Modref,
(double ,)&(modinrefch1.EWdetmp));
processed.WinModDiff1b = ModDiff1(mod. &moddiffinch1,
count - delaytime2);
processed.AvgModDifdb = ModDiff2(mod. Smoddiffinchl);
processed.AvgModDrff2b = ModDiff3(mod. &moddiffinch1);
Ntotaltest = toudness(processchl.Etest);
Ntotalref = loudness(processch1 .Eref);
if(Ntotaltest > 0.1 || Ntotalref > 0.1) {
noise =
1
;
#if defined(LOUDMOD02)
intemal_count = 0;
#endif
>
II Delayed Averaging
+
loudness threshold
if(noise && intemal_count <= delaytimel) {
II skip 0.05 sec (about 3 frames)
intemal_count++;
loudcounter++;
)
else {
lev = levpatadapt(processch1.Etest. processchl.Eref. rate,
&levinch1. hann);
prccessed.RmsNoiseLoudb = norseloudness(processch1.Modtest.
processchl.Modref.
lev. &nltmp.
count - de!aytime2
- loudcounter);
}
)
/*{
extern double CfftQ;
extern int maxk:
FILE *fp;
logvariable(’Cfftsx.txt’. Cfft. 128);
fp = fopen("Cfftsxmaxpos.txt’. "a+*);
fprintf(fp.“%dVi".maxk);
fclose(fp);
>V
if(*ch2ref && ’ch2test){
ch = 2;
earmodelfft(ch2ref. Ipref, hann. processch2.ffteref.
processch2.fftref);
earmodelfft(ch2test. Iptest. hann. processch2.fftetest.
processch2.ffttest);
critbandgroup(processch2.ffteref. rate. hann. processch2.ppref);
AddlntNoise(processch2.ppref):
cri!bandgroup(processch2.fftetest. rate. hann. processch2.pptest);
AddlntNoise(processch2.pptest):
for(k=0;k<hann/2;k++)
processch2.fnoisejk] = module(processch2.ffteref[k))
- module(processch2.fftetest(k));
critbandgroup(processch2.fnoise. rate. hann. processch2.ppnoise);
spreading(processed,pptest. processch2.E2test);
spreading(processch2.ppref. processch2.E2reO:
61