A D-class audio power amplifier including a microprocessor, a power
amplifier, and a low pass filter is provided. The microprocessor is used
to sample an input audio signal and output a pulse width modulation (PWM)
clock signal. The power amplifier is used to amplify the power of the PWM
clock signal and output a power-amplified signal. The low-pass filter is
used to filter the high-frequency signal portion off the power-amplified
signal and output an output audio signal. The method includes sampling
the input audio signal to obtain a number of digital sampling values;
obtaining corresponding duty cycles according to the digital sampling
values and a reference voltage level and generating the PWM clock signal
accordingly; power-amplifying the PWM clock signal to obtain the
power-amplified signal; and filtering the high-frequency signal portion
off the power-amplified signal to obtain the output audio signal.