Hi.

Once I heard of an application for Mac OS X that it automatically pauses the song for any annoyance when the headphone jack is pulled out of the Mac when your are listening music and studying in the library.