How to direct Flash audio to a specific device

I had always read that Flash picked the alsa default device for audio playback and that there was no way around it. However, I just stumbled across this: Flash has an environment variable “FLASH_ALSA_DEVICE’” which can be set to direct flash output to a specified device.

If you want to direct Flash output through your surround 5.1 output, for instance, you would either run firefox in a terminal:

steve@linux-3qbo:~> export FLASH_ALSA_DEVICE=surround51
steve@linux-3qbo:~> firefox

or you would edit the command in the firefox launcher to

export FLASH_ALSA_DEVICE=surround51 && firefox %u

This way you can run flash through whatever device you want without having to set the system playback default to that device.

This is, of course, for those not using PulseAudio.

Correction: the referenced alsa device needs to be prefixed by “plug:”. Thus the correct export command would be

export FLASH_ALSA_DEVICE=plug:surround51

and similarly for change to the launcher command. Sorry for the initial error.