It's taken more than a decade, but browser makers are finally creating a way of getting rid or at least identifying annoying websites that play sounds in the background. By the time they got to it, most websites have realized why it's such a poor idea to do this in the first place, and stopped.Still, better late than ever. Google is working on a feature that would add a notification to tabs that currently play sounds.
The feature is only available in the latest Chromium builds, but it should be making its way to the dev channel as soon as Chrome 27 debuts.
This only works on YouTube if you've joined the HTML5 video trial, so it's possible it doesn't work with Flash audio, or at least it doesn't work for now, which would defeat the purpose for the most part.