| dLastFrame | last idx |
| dThisInput | current idx |
| aA | attack coefficient |
| aR | release coefficient |
| out | adjusted loudness frame |
This code corresponds to the AGC stage in the binaural loudness model moore2016 in the version for TVL 2016 based on ANSI S3.4-2007 and Moore & Glasberg (2007).