The roles that frequency-dependent eigenmodes play in the acoustic scattering of an open cavity connected with rigid-wall ducts are revealed. Peaks and valleys of scattering coefficients are generally found to be result of constructive and destructive interferences between eigenmodes. An approximated equation is proposed to characterize the Fano resonance which is induced by quasi-trapped mode. The usage of frequency-dependent and frequency-independent eigenmodes for describing free and forced sound field is clarified.