winmm: Fix TIME_SMPTE test

Francois Gouget fgouget at codeweavers.com
Mon Jul 19 17:50:59 CDT 2004


Hi Robert,

Robert Reif wrote:
> 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.

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.

> 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.

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.

> 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.

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.

-- 
Francois Gouget
fgouget at codeweavers.com




More information about the wine-devel mailing list