all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Updated patch for a Windows implementation of play-sound
@ 2002-10-23  4:59 Ben Key
  2002-10-23  5:30 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Key @ 2002-10-23  4:59 UTC (permalink / raw)
  Cc: jasonr, rms

[-- Attachment #1: Type: text/plain, Size: 2651 bytes --]

This is an updated version of my patch to provide a Windows compatible
implementation of play-sound.  Currently only Emacs version 21.3.5 is
supported by this patch.  I will later be releasing a version of this patch
that supports version 21.2.

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/lisp.h has been modified so that the preprocessor symbol
_USE_PLAY_SOUND_INTERNAL is defined.  In the pending 21.2 compatible version
of this patch, this change will not be included.  This change is necessary
for version 21.3 because the file w32sound.c is used for both versions and
the name of the play-sound internal function is different in version 21.3
(play-sound-internal) than it is in version 21.2 (play-sound).  If the
preprocessor function _USE_PLAY_SOUND_INTERNAL is defined, the primary
function in w32sound.c is defined as play-sound-internal and it is defined
as play-sound otherwise.

* src/makefile.w32-in has been modified to compile w32sound.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.

* src/sound.c has been modified to avoid any chance of a conflict between
w32sound.c and sound.c.  Previously the statement
  #ifdef HAVE_SOUND
was used to determine whether or not to compile the file.  This has been
changed to
  #if defined(HAVE_SOUND) && !defined(_WIN32)

* src/w32sound.c has been added.  This contains my Windows implementation of
play-sound.  It is conditionally compiled as follows:
  #if defined(HAVE_SOUND) && defined(_WIN32)

This compound test is used to eliminate any possibility of a conflict
between sound.c and w32sound.c.

Also included in this ZIP file is a shell script designed to make applying
this patch easier.  Simply copy both dopatch21_3.sh and
emacs-21.3.50-w32-play-sound.diff into the directory containing your Emacs
source and run the shell script.  Then compile as you normally would.

This version of this patch is much cleaner than my previous version.  I am
no longer defining _WIN32_WINNT or WINVER to 0x0501.  This will eliminate a
large number of compiler warnings.  I also was very careful to make certain
that no changes were added into the patch inadvertently.


This patch has been tested using MSVC 6.0 and MingW 2.0.

I hope that this patch addresses all the issues that arose from my previous
patch.

[-- Attachment #2: emacs-21.3.50-play-sound-patch.zip --]
[-- Type: application/x-zip-compressed, Size: 5642 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-10-23  6:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-23  4:59 Updated patch for a Windows implementation of play-sound Ben Key
2002-10-23  5:30 ` Stefan Monnier
2002-10-23  6:16   ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.