The photoacoustic effect at first-order phase transition