A method for calculating the modes of vibration of two-dimensional cavities is presented. This method can be used for shapes that are simply connected, having two axes of symmetry. It is based on a method for computing wave propagation in waveguides of arbitrarily changing cross-section, originally proposed by Roure (1976). The cavity under consideration is approximated by a series of rectangles along one of its axes of symmetry, and treated as a waveguide. The input impedance of this waveguide is used to calculate the resonant frequencies, and a calculation of the pressure along this waveguide shows the corresponding vibrational modes. To demonstrate the validity of the proposed method, we analyze a circular cavity, with good agreement to analytical results.