Thermoacoustic Waves In A Confined Medium