If you have ever had problems getting your favorite audio/video player and Firefox to play sound at the same time or if you were ever curious about how they shared the sound card, a look inside the config file for Firefox might be what you need.

The global config file for Firefox is usually located at /etc/firefox/firefoxrc, but I like to edit my personal copy (located at ~/.mozilla/firefox/rc) so that my customizations follow me around in my home directory. Inside the file you should find a setting FIREFOX_DSP="xxx". In my case, I didn't have a global nor a local config for Firefox, so Firefox would chose whatever the compiled-in default for this setting was (in my case, I think it was "none").

I fixed my mute Firefox problem by creating the "~/.mozilla/firefox/rc" file and entering FIREFOX_DSP="aoss". A restart of Firefox and again I'm hearing the ding of a new message in my webchat window blended in nicely with my backround music.

For this option to work, you must have the alsa-oss package installed (this is the name for Debian-based distros, your's might differ). What this package provides is a wrapper that was written to give applications a black-box of sorts where they can play sound through an OSS style interface which really plays it through an ALSA sound driver. Using ALSA allows applications to share the sound card where (AFAIK) the OSS drivers only allowed one application at a time to write to the sound card.

The other options for accomplishing this are Esound, aRts, and the more recent PulseAudio sound servers. AFAIK these basically take the requests from all audio capable applications and mix them together before feeding them into the sound card to be played. The ones that I have looked at seem to take the same approach as mentioned above to allow applications not designed to work with a sound server play sound through them.