emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updated patch for a Windows implementation of play-sound


From: Stefan Monnier
Subject: Re: Updated patch for a Windows implementation of play-sound
Date: Wed, 23 Oct 2002 01:30:02 -0400

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

If I were you I wouldn't bother with a 21.2 version.  It would
only be used by people who want sound but don't want to use 21.3.50
and yet are willing to get the source code and recompile.  I expect
this group of people to be pretty small (especially on w32).

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

The main target should be 21.3.50 so it would be better not to add
unrelated cruft in it.

> * 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)

How about not adding a new file w32sound.c but instead adding the
corresponding code to sound.c (and of course wrap things in
#ifdef WINDOWSNT (or _WIN32, I don't know what is what: most of
the Emacs C code I've seen seems to be using WINDOWSNT)).
This way the parsing and other such things will be shared.

Oh, and please just send the plaintext patch as attachment,
so we don't need to save/unpack the zip archive to read it.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]