This paper presents a dual-mode switching method between time-domain codec and transform-domain codec of audio coding. It is a key technique of unified speech and audio (music) coding, since the replaying audio quality corresponds to the suitable codec selection and smooth switching between them. The proposed method consists of two steps, codec mode selection and switching. The binary decision trees (BDTs) algorithm is used to take a decision of mode selection, because of its advantages of high accuracy, low delay and low complexity. For smoothing transition between two codec, a pre-coding strategy is suggested in this paper. The classical speech codec, Algebraic Code Excited Linear Prediction (ACELP) and the Advanced Audio Coding (AAC) of MPEG are used for validating the proposed method. The scores of PESQ with 11 testing sequences show that the proposed switching method will not bring additional noise and can get higher objective evaluation of audio quality than single codec.