A class D amplifier is provided. The class D amplifier includes a
modulator and a class D power stage. The modulator provides a PWM output
signal to the class D power stage. For each pulse of the PWM input
signal, the class D amplifier provides a corresponding pulse in the PWM
output signal, such that the pulse is terminated when the area under the
pulse of the output of the class D power stage is substantially equal to
the area under the pulse of the corresponding PWM input signal. In this
way, the class D amplifier provides instantaneous per-pulse PWM feedback.