My wife was having a weird audio problem on 10.7.2 - she'd be listening to iTunes, plug in her headphones, then get silence. Restarting iTunes would make the audio work on the headphones, but then if you unplug the headphones, silence until restarting it again. Same symptoms with watching YouTube videos in Safari.
Poked around a bit, finally found a corrupt preference file - com.apple.BezelServices.plist - deleted it, logged out and back in, and sound is working right again.