From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: Updated patch for a Windows implementation of play-sound Date: Wed, 23 Oct 2002 01:30:02 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <200210230530.g9N5U3q05183@rum.cs.yale.edu> References: <000001c27a50$fb6b70d0$6401a8c0@GODDESS> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035351163 30842 80.91.224.249 (23 Oct 2002 05:32:43 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 05:32:43 +0000 (UTC) Cc: emacs-devel@gnu.org, jasonr@btinternet.com, rms@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 184E8H-00081B-00 for ; Wed, 23 Oct 2002 07:32:41 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 184E9p-0005R6-00 for ; Wed, 23 Oct 2002 07:34:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 184E6p-0002hk-00; Wed, 23 Oct 2002 01:31:11 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 184E5s-0002Ki-00 for emacs-devel@gnu.org; Wed, 23 Oct 2002 01:30:12 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 184E5o-0002KB-00 for emacs-devel@gnu.org; Wed, 23 Oct 2002 01:30:11 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10) id 184E5n-0002F0-00; Wed, 23 Oct 2002 01:30:08 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g9N5U3q05183; Wed, 23 Oct 2002 01:30:03 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: "Ben Key" Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8669 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8669 > 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