Up until today I’ve only been able to get one audio stream at a time on my Linux machine. For example if I have firefox and amarok open then amarok will take the one ALSA stream and if I try to play a flash video, or audio stream, in firefox it won’t work. Using google (obviously) I found the solution here (see post #5 by r!ot – via here). Reinstall (or install) pulseaudio and libfalshsupport:
sudo apt-get install --reinstall pulseaudio libflashsupport
Then (for GNOME) go into System->Preferences->Sound and in the Devices tab set the option for everything to “PulseAudio Sound Driver” (you can test these to make sure it works). Once I’d done this I was able to open amarok and firefox simultaneously and get sound from both. (BTW – this worked for me under Ubuntu 8.04 Hardy Heron, with firefox 3.0.4 and amarok 1.4.9.1)
There another thing you’ll want to do if you also want lastfm to play using pulseaudio rather than the default ALSA device. To do this follow the advice given here (either wrongside’s suggestion or deathrow1986’s suggestion if you’ve not got an /etc/asound.conf file – I had to follow deathrow1986’s method and it worked fine).