ГОСТ Р ИСО/МЭК 10373-6—2015
Iclose(poutput);
//4. USING A SMOOTHING FILTER (MOV. AVG) TO REDUCE THE NOISE
filterlength-3;
lengt,h_t.otal-envfilL(rate, voutput, (.output, lilLerlength, tint, tfin,
samples, envelope);
ПЪ. 100’. OF H INITIAL
Hmaxlinder(envelope, &Hmax, «Hmin, Lengtlihotal);
//6. COMPUTING THE ISO BASED TIKES
t!inaer(type,envelope,toutput,trni,Hmax,Hrrun,rate,lengthtotal,trmesp);
//7. Кjoin FOR BIT RATES OF ie/8, fe/4 AND Yc/2
1Г (rate— i’/00 IIlate— 3400 IIrate— 6BD0)
Mminlinaer(envelope, Umax, Hnun, atonaxVHBR, timeap, length
total);
1
//8. CHECKING FOR ISO DEFINED MONOTONY
if (rate— 106 || rate— 212 || rate--424 || sate— 848)
jnonocheck(envelope, toutput, limax, timesp, rate, type};
out_i-0;
while (Ouh_KMAX_SAMPLES) I! Finds how many 2eros are at. the
beginning oi vector envelope
I
1
Г (envelope[out_r)--0
uk
r.ag_eut«—C)
(
samp le_in -out._i;
ttni-toutput(sample_rnttl|;
I
I
if (envelope(out_r
1
!-0)
I
lLag_cut-l;
sample_end-o ut_
1
;
tlln-toutput(sampleend);
out_i**;
\
samples-sample_end-sample_ rni-1;//~>US
for (out_t-0; out Ksamples; outi**)
I
v o u tp u t[o u tr 1-envelope[out_x♦s a m p le in rtl];
toutput |out
_
i l-toutput [out r4sam ple
_
ini♦!
1
,-
\
lor (ou»._l-Samples‘1; out KMAX SAMPLES; ouC_i‘*-)
(
voutput|out_i1-0.0;
t
toutput(out_j1-0.0;
■
t.ini-toutput(01;
tlin-toutput(samples];
П 9. OVERSHOOT OF THE READER
fprintf (stdout,"\n");
/’
2nd set ol 1unctions, "New Line" printed
for debug purposes
tr (rate— 106 || rate— 212 || rate— 424 || rate— 848)
I
filterlength-3;
91