Robert Reif wrote:
This is a proof of concept patch that adds a simple audio test to winecfg. All it does is use PlaySound to play a wave file. I am using LoadLibrary("winmm.dll") and FreeLibrary to change drivers. You must press the apply button for the driver change to take effect. There is no error recovery for a missing winmm.dll. The wave file name is in the rc file so a different file can be played for each language. This is probably overkill. I'm not sure where to put the wave file so the program will only work when the wave file is in the current directory.
The wave file can be found here: http://home.earthlink.net/~reif/winecfg.en.wav or you can rename any old wave file to: winecfg.en.wav.
Comments please?
1/ why don't you store the wave in the resource file ? (PlaySound has the ability to play a sound from the resource file) 2/ in order to change drivers, one could also look at the installed drivers from winmm and setup the wave mapper to point to the desired one for playback. that would prevent from loading/unloading winmm for each driver change 3/ I'd also update the drivers' list with a status: - non present: the driver cannot be used in current system - available but not loaded: winecfg detected it as present, but winmm couldn't load it - loaded: winecfg detected it as present and winmm did load it.
A+