Photo-acoustic analysis of first- and higher-order phase transitions in 8CB liquid crystal