Photoacoustic Detection of Phase Transitions