For minimum pulse generation in a class-D amplifier, a trapezoid switching waveform shape is used to replace the tradition triangle type to generate PWM pulses. Two voltages are compared with a sawtooth wave signal to generate the trapezoid waveform signal and a constant pulse width signal. An audio input signal is compared with the trapezoid waveform signal to generate a pulse width modulation signal, and either the pulse width modulation signal or the constant pulse width signal is used for driving a load at an output of the class-D amplifier. Flexible minimum pulse width could be obtained by offsetting one of the two voltages in generation of the constant pulse width signal.