SMPTE support in windows is not a hardware feature. winmm just takes the byte count read/written and converts it to a different format. Windows rounds up partial frames (hence ceil). I thought it was strange but thats what it does.
There is also an off by one bug in msacm pcm conversions which triggers on certain conversions.
The only way to confirm windows behaviors is to run the winmm test in interactive mode. winetest would need to be changes to run it that way and the tests could take longer than the timeout period when multiple sound cards are present.
Could we please run the winmm tests in interactive mode by default and then make changes if necessary to duplicate windows behavior rather than just making untested changes. The winmm tests work fine on my hardware in windows xp as is and also in wine except for the msacm off by one bug with certain format conversions.
Francois Gouget wrote:
Hi Robert,
Robert Reif wrote:
Which Windows platform did you test this on?
I applied the following patch to the winmm tests and got 'TIME_SMPTE not supported' on every platform I tested it on. (the patch is going to be line wrapped here but you get the idea)
Index: wave.c =================================================================== RCS file: /var/cvs/wine/dlls/winmm/tests/wave.c,v retrieving revision 1.31 diff -u -r1.31 wave.c --- wave.c 19 Jul 2004 20:08:24 -0000 1.31 +++ wave.c 19 Jul 2004 22:28:14 -0000 @@ -241,6 +246,8 @@ (BYTE)(fmod(floor(duration/60), 60)), (BYTE)(fmod(duration,60)), (BYTE)(fmod(duration*mmtime.u.smpte.fps, mmtime.u.smpte.fps))); + else + trace("TIME_SMPTE not supported\n"); }
There is also an off by one bug in msacm pcm conversions which triggers on certain conversions.
Could you provide more details? Is this on Windows?
The only way to confirm windows behaviors is to run the winmm test in interactive mode.
I believe the idea behind winetest is that it should run unattended. Running interactive tests unattended does not seem to make much sense. However, providing a way for winetest users to explicitly run it in interactive mode would be nice.
Do you mean that for you waveGetPosition() returns the number of samples played and not the number plus one on your Windows XP machine? That's certainly not what I am seeing on my Windows XP, Windows NT4, Windows 98 and Windows 95 machines. Now the winmm tests run successfully on all these Windows platforms in interactive mode.
The only way to test the actual capture and playback code paths is to run in interactive mode. It would be nice to have someone listen to what is played but it is not absolutely necessary to determine if the function calls fail or return bad data.
Robert Reif wrote:
The main goal of interactive tests is to have someone actually listen to the test tones and verify that they are being played correctly: with no stutter and at the correct pitch and volume. This cannot be automated.
However it's true that more tests are being performed in interactive mode and that some don't require anyone to listen. So maybe we could have the tests play silence (and not touch the volume) when they are run in non-interactive mode.
The capture test can be considered non-interactive already since it does not matter if someone listens to them or not: the capture test records sound but there is no proof that the sound was recorded properly (it's exactly like electronic voting, you vote but you don't know what the machine did). The only way to check that would be to play the sound back and have a human check that what is being played corresponds to what was supposed to be recorded. Of course that supposes actually hooking up a microphone or some other sound source to the soundcard...
So the only potential issue is the timeout one...