The scenario : I have a built-in sound card and a USB sound card (with mike and headphones) - I listen to the radio (RadioSure ! - the best) on the built-in sound card which outs to the speakers and I use the USB soundcard for Skype.
However sometimes I would like to listen to whatever is streaming through the browser (K-Meleon - dare I say the best ?) via the USB sound card while leaving the radio on the built-in sound card.

I hope that's clear - so I'm looking for a freeware that allows me to control what goes where.

i have 2 soundcards and i understand what you want.. i listen to online radio -usually default soundcard via speakers and then i would like to check an mp3 song before download to check if it's of good quality or the proper song etc..so i didn't want it to play through default one cause it would ruin my radio listening session and i wouldn't hear it properly with 2 streams playing at the same time.

in windows 98, there is something i think is very smart but it's not available on other win oses..when 1 sound card is engaged(busy) it would automatically route the 2 output through the 2 soundcard(non default) this was really smart but ms decided to stop that and play out all through your default soundcard|(unless ofcourse your audio player had an option to choose output)..this does not apply on directx playback which will always use your default soundcard. the reason why ms did that after windows 98 is because most users just have one soundcard and in win98 that caused problems with multiple streams or outputs and you would get an error message"soundcard not available" but ofcourse for those with multiple soundcards, win 98 was the best by auto routing.

unfortunately i never found a freeware program to do what win98 did by default.. i once did find a shareware product but it was very unstable and wouldn't always work..i forgot its name anyways.

what i do now is toggling the default sound card before i want to play something with an autoit script because it can read registry first but you can do the same thing directly with regedit and a reg key and can be easilt implemented with a macro

if you download the mp3 file, you don't need this procedure because you can add a context menu command to an mp3 player which is automatically set to use soundcard2 regardless of your default one(non sound mapper). almost all good mp3 players give you that option: nad, winamp, sonique etc

but if you want to listen to the stream via browser plugin it will use the default mapper (directx) and you will need to swap default card first.

first you will need to know the exact name for the soundcards registered as an audio device.. you can find that in sound and audio panel.

then you make a registry key with the desired soundcard set as default.

(the /s switch is to make regedit use silent mode without prompting when adding the regkey)

now before you want to play your other stream etc, just click tools>soundcards and select soundcard 2 as default this will use your 2nd soundcard when you play that file.

if you prefer a specific soundcard to be default and in case you forgot to switch back to it, you can add a shortcut in startup to use the soundcard1.reg for e.g
regedit.exe /s c:\soundcard1.reg
this way the system with revert to default soundcard always after you logoff or startup.

this functions much better and the default soundcard will have a checkmark.. unselecting the checked soundcard or selecting the unchecked soundcard will switch default device to the other card(super-toggle). this way you can easily tell which soundcard is currently the default one from the menu.

updates include a statusbar indication of which soundcard is default and there's also an audioalert saying which card has been set as default to ensure the device has been switched properly before opening a stream.

there's also an accelerator (ctrl+alt+l) for easy toggle.

kmeleon will now revert to default soundcard automatically upon exit so you don't need to worry about forgetting to set back the default one and there's no need for startup reg entry now.

the package includes the audio wav alerts, extratc in kmeleon folder and then open the macro to edit values according to device name and regkey paths. you can also use the extension manager kem'edit macro' button.

Thanks again disrupted - if you do a scroogle on "controlling two sound cards in xp" you'll see that there are thousands of requests for information about how to do this very same thing ! So, maybe we won't be the only two to use it.

Apart from that I had a few problems with the macro, for one thing I'm somewhat colourblind so red and green don't go well together - it's hard to distinguish them. And then, I didn't realize at first that the soundcard names had to be changed further down. Here is what I've done - could you check it please for mistakes as I don't get the checkmark in the menu etc.

you only need to edit the parts at the beginning.. the rest doesn't really need to be changed..they might not sound correct for your soundcards but they are just statement commands and won't affect anything.. i just called them with my souncards so i don't get confused when working.

just change the parts in grey and leave rest of macro in its original code
sorry about green and red

#--edit values below according to souncard names and regkey paths
$sc_primary=("Creative SB PCI");
$sc_secondary=("FM801 audio PCI");
$primary_key=("I:\\applications\\applications-x\\PopSel\\exras\\sound1.reg");
$secondary_key=("I:\\applications\\applications-x\\PopSel\\exras\\sound2.reg");
#--end of edit values
#-------------------------------------------------------------------------------------------------
and ofcourse as desga has mentioned, the path must have double slashes \\ not just one

this is a nice find, thanks jfk.. it can't be integrated with km though(doesn't support commandline switches and has to be closed manually)

to use the extension, you need to make 2 separate regkeys for the 2 cards..each as default and the name for the soundcard in the regkey must be exactly as displayed under audio devices(controlpanel>audio).

also this extension will probably need administration rights or permissions to run regedit so it can merge the key and overwrite the default soundcard.. especially vista might not allow any user to merge into the registry without special rights

there's also another thing i'm not sure of because i didn't test it on 9x..it might not work on 98 because i;m not certain that the reg path for default audio device is the same there as in xp.. also for 9x even if the path is correct , the regkey must be 4.0 and not 5.0

that's strange..on my pc, it automatically swaps the soundcards..it's xp and using 2 pci soundcards, what's your operating system.. maybe it differs in another os..or maybe usb or integrated cards have to be set manually..i'm not sure

also note that if a sound is already playing and you switch to the other..the sound will still stay playing through the previous card, only when you open another stream or audio file is when the output uses the 2nd soundcard

ok,maybe the soundcard names are not set properly in the regkeys..in that case, windows will not change the soundcard and ignore the entry because it's not a valid audio device.

open regedit and browse to the location:
hkcu>software>micrisoft>multimedia>sound mapper

export the key as soundcard1.reg and save it to the location specified in the macro
(leave regedit open)

then open sound and audio devices and change your audio device to the you secondary(usb) click apply
go back to regedit and export the key as soundcard2.reg and save to same path specified from the macro
(leave regedit open)

now using kmeleon toggle the soundcards from the menu, refresh in regedit and see if any change happens to the playback value

if the reg value is not changed when you toggle..then check the path where you have the regkeys saved and in the macro make sure the path has double slashes like desga has mentioned not just one slash

an easy way to test whther the path is correct is by replacing all regedit.exe entries to notepad.exe..restart kmeleon and toggle sounds.. does notepad opens the regkey to edit? if notepad opens the key..then the paths are correct..if not then the paths you've entered in the macro has an error..make sure notepad opens the regkeys and then edit the macro again and replace notepad.exe entries to regedit.exe

case 2: if the paths are all correct yet the key for playback is not changed in regedit, then that means that you need administrative rights because regedit or adding regkeys externally is disabled on your system

case 3: if the regkey is changed for playback when you toggle but the actual default device is not changed, then that means this can be something to do with limitations with usb or integrated(built-in) cards that require to be changed only from sound/control panel..in that case report back and i will try to do something with autoit that doesn't need the regkeys

i remembered something very important:
make sure in sound properties: the option 'use only the default device' is not selected..this one is trouble, make sure its unchecked before testing anything.. if it was already unchecked, then proceed normally with above steps

COOL - it works ! Thanks disrupted for taking all that time to reply and do those screen-shots and all.
It was the registry keys - when I followed your new method of exporting then changing default and then exporting again everything works fine.

Looking forward to seeing what this idea gave you as another idea !

btw : that Simpsons link I put up now has crazy ads to go through before you can vision - hopefully that won't last
Anyway, here's another one : The Simpsons