A method for generating an audio output from an audio amplifier, the
method consisting of receiving a segment of an input audio data stream
into a buffer, identifying an adjustment interval in the segment, and
calculating an average energy of at least a section of the audio data in
the buffer subsequent to the adjustment interval in the segment. The
method further includes determining a constant amplification factor in
response to the average energy and to a pre-set volume level of the audio
output, outputting the audio data from the buffer to the audio amplifier,
and, when the audio data output to the audio amplifier reaches the
adjustment interval, adjusting the audio amplifier to apply the
amplification factor to the audio data in at least the section subsequent
to the adjustment interval.