common: Integrate the codes of cleaning up audio output handler.