This is another updated version of my patch to provide a Windows compatible implementation of play-sound. In this update I incorporated several more suggestions made to me by members of this list. The largest change between this patch and my previous one is thaI am no longer adding a file w32sound.c. Instead I am using sound.c. The changes made by this patch are as follows: * nt/nmake.defs and nt/gmake.defs have been modified so that the constant WINMM is defined in such a way to indicate how to link with the library WINMM.LIB. This constant was defined much like the constants ADVAPI32, COMDLG32, GDI32, MPR, SHELL32, USER32, and WSOCK32. * src/makefile.w32-in has been modified to compile sound.c and to link with WINMM.LIB. * src/s/ms-w32.h has been modified so that the preprocessor symbol HAVE_SOUND is defined. This enables sound support in Emacs. * The code that was previously in w32sound.c has been merged into sound.c. sound.c has been reorganized sightly to make it easier for the platform specific portions of the code to be enclosed by #ifdef statements and has been divided up into well commented sections to ensure that there is no misunderstanding about the purpose of a particular #ifdef block. In order to do this in as clear and orderly a fashion as possible, I had to move some blocks of code up or down to deal with situations where code that works in all platforms was thrown right in the middle of a large block of platform specific code. So far I have tested this patch under Windows using both MSVC 6.0 and MinGW 2.0. I have not been able to test this patch under Linux because I have not yet finished setting up my Linux machine (maybe tomorrow). I cannot test this patch under any other platforms besides Windows and after tomorrow, Linux, because I do not have access to any other platforms. I would appreciate it if someone would apply this patch on a platform that I do not have access to yet has sound support and see if sound.c will compile properly on that platform (perhaps Mac OSX).