Boundary spectral method for acoustic scattering and radiation problems