The comfort noise generation procedure uses the RPE-LTP speech decoder algorithm defined in
GSM 06.10 [3].
When comfort noise is to be generated, then the various encoded parameters are set as follows.
The RPE pulses (Xmcr) are replaced by a locally generated random integer sequence, uniformly distributed between 1 and 6.
Also the grid position parameters (Mcr) are set to random integer values, uniformly distributed between 0 and 3.
The LTP gain values (bcr) are set to 0.
The LTP lag values (Ncr) of the 4 sub-segments are set to 40, 120, 40 and 120 respectively.
The 4 block amplitude values (Xmaxcr) used are those received in the SID frame.
The log area ratio parameters (LARcr) used are those received in the SID frame.
With these parameters, the speech decoder now performs the standard operations described in
GSM 06.10 [3] and synthesizes comfort noise.
Updating of the comfort noise parameters occurs each time a valid SID frame is received, as described in
GSM 06.31 [4].
When updating the comfort noise, the parameters above should preferably be interpolated over a few frames to obtain smooth transitions.