unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ben Key" <Bkey1@tampabay.rr.com>
Cc: <jasonr@btinternet.com>, <rms@gnu.org>
Subject: Updated patch for a Windows implementation of play-sound
Date: Wed, 23 Oct 2002 00:59:34 -0400	[thread overview]
Message-ID: <000001c27a50$fb6b70d0$6401a8c0@GODDESS> (raw)

[-- 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 --]

             reply	other threads:[~2002-10-23  4:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-23  4:59 Ben Key [this message]
2002-10-23  5:30 ` Updated patch for a Windows implementation of play-sound Stefan Monnier
2002-10-23  6:16   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001c27a50$fb6b70d0$6401a8c0@GODDESS' \
    --to=bkey1@tampabay.rr.com \
    --cc=jasonr@btinternet.com \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).