I just tried the free Shazam application on the iPhone (available through the AppStore), and it's really really great (even if I don't know if it could be really useful). In case you don't already know what it does, here it is:
You point your iPhone microphone in the direction of any music playing, wait for approx. 10 seconds, and it gives the title of the track, album, and even the cover... Some people commented that it could only recognize mainstream, but it's not true: although it failed on Neurosis, Asphyx, and 1349, it had absolutely no problems with random songs of Emperor, Zyklon, Gorgoroth, Carpathian Forest, Marduk, Celtic Frost, or Arkhon Infaustus.
I don't think this list can count for only mainstream ;-)