You can switch at will. Sound is independent of X. How you switch is a question of the applications in question. mplayer, xmms, audacity, and others let you choose the device. Mozilla, firefox, festival, .... don't.
Where they don't, you can either re-index your soundcard so the preferred one is device 0. Basically a bit complex on that one. For apps that use alsa natively, you can just put a defaults.pcm.card 0 to tell it which device to use in your .asoundrc. OSS based apps default to 0 no matter what you tell them. Sometimes usable if you start the app with aoss. Sometimes not. So it really depends on how you want to do the switching. If you're using jackd and pulse audio and other things, you can simplify it a bit. But it generally involves restarting the sound daemon, and or modifying a configuration file. And worst case scenario, all of the above in addition to restarting alsa and running alsamixer to restore levels. Some distros prepackage the scripting for these mods. Some don't.
|