On the refraction of longitudinal waves in compressible media