Eric Pouech wrote:
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)
I considered that but the trick is to come up with a universal test sound
that anyone would recognize as either playing properly or playing with
some type of distortion (speed, noise, breakup, ...).
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
That would require all available drivers to be loaded. By driver, I'm
talking about
ALSA, OSS, Jack, ..., not sound card one or two. Enumerating the
available sound cards and testing them individually could also be added.
I could unload the wine driver directly (winealsa.drv, wineoss.drv,...) and
load the new one but I didn't know how robust that would be so I
just let winmm.dll do all the work. I'll try unloading the drivers
directly and see
what happens.
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.
ok