Francois Gouget wrote:
This test extends the winmm test and makes it possible to play actual sound. Of course the test will not do that unless you specifically ask for it:
- I doubt anyone would be happy to do 'make test' in Wine's main
directory and to get annoying long beeps comming out of their computer
- tests are usually run unattended and there is not much point playing
the sounds if no-one listens to them to make sure they got played correctly.
So what does it do? For each supported format it plays the international 'LA', i.e. a 440Hz sinusoid. It is expected that on some sound cards and for some formats the signal will have to be converted from 8 to 16 bit or from mono to stereo, or even resampled. Normally this should not affect the sound being played so you should keep hearing the same tone. If that's not the case then something went wrong during th
I may have a counterexample. The patch I submitted recently was to fix a hang in playing sound. So if you add a timeout to your test, it would at least verify that sounds played in the proper amount of time, and didn't hang wine.
- Dan
Hi Dan,
Dan Kegel wrote: [...]
I may have a counterexample. The patch I submitted recently was to fix a hang in playing sound. So if you add a timeout to your test, it would at least verify that sounds played in the proper amount of time, and didn't hang wine.
Yes, there are a number of failure modes that could be tested automatically. Wine could crash for instance...
What I could do is modify the test to play silence by default, and only play an actual tone if the user asks for it. I should also document the goals of playing a tone a bit more in the test itself. Maybe printing a trace telling the user how to play a tone could be nice (otherwise it's hard for someone running the test to know that the test has options). The message could look something like:
winmm.c: Playing silence, use 'tone' option for an actual tone
The idea of timing the sound and verifying that it does not play in less time than it's supposed to could work too. I'm a bit worried by that but I guess all that can happen is that we will overestimate the time it took to play the tone, not underestimate it.
Well, if nobody objects I can add all that to the test once it's committed.