A DSP-based integrated Class-D amplifier