The proper way to set the default sound card is to use the same registry keys as Windows and either use a native mmsys.cpl or devise a wine specific way of doing the same thing.
Creating a builtin mmsys.cpl is one way of accomplishing this and another way is to add this capability to winecfg. You could also have winecfg launch mmsys.cfg (native or builtin).
Any ideas on what would be the best way for wine?
Here are some of the registry keys and a link to some documentation: http://www.cs.vu.nl/~pboon/md/indexold.htm
Index: tools/wine.inf =================================================================== RCS file: /home/wine/wine/tools/wine.inf,v retrieving revision 1.31 diff -u -p -r1.31 wine.inf --- tools/wine.inf 11 Apr 2005 18:49:28 -0000 1.31 +++ tools/wine.inf 12 Apr 2005 04:59:23 -0000 @@ -40,6 +40,7 @@ AddReg=\ Fonts,\ MCI,\ Misc,\ + Multimedia,\ Nls,\ OLE,\ Tapi @@ -558,6 +559,11 @@ HKLM,System\CurrentControlSet\Control\Nl [OLE] HKLM,"Software\Microsoft\OLE","EnableDCOM",,"Y" HKLM,"Software\Microsoft\OLE","EnableRemoteConnect",,"N" + +[Multimedia] +HKCU,Software\Microsoft\Multimedia\Sound Mapper,"PreferredOnly",0x10001,00000000 +HKCU,Software\Microsoft\Multimedia\Sound Mapper,"Playback",,"" +HKCU,Software\Microsoft\Multimedia\Sound Mapper,"Record",,""
[Tapi] HKLM,%CurrentVersion%\Telephony,"Perf1",0x10001,5045524a