From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Ben Key" Newsgroups: gmane.emacs.devel Subject: Updated patch for a Windows implementation of play-sound Date: Wed, 23 Oct 2002 00:59:34 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <000001c27a50$fb6b70d0$6401a8c0@GODDESS> Reply-To: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0001_01C27A2F.745CDE10" X-Trace: main.gmane.org 1035349213 19457 80.91.224.249 (23 Oct 2002 05:00:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 05:00:13 +0000 (UTC) Cc: , Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 184Dco-00053G-00 for ; Wed, 23 Oct 2002 07:00:10 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 184DeL-0004mZ-00 for ; Wed, 23 Oct 2002 07:01:45 +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 184Dcq-00016f-00; Wed, 23 Oct 2002 01:00:12 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 184DcE-0000yB-00 for emacs-devel@gnu.org; Wed, 23 Oct 2002 00:59:34 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 184DcC-0000x7-00 for emacs-devel@gnu.org; Wed, 23 Oct 2002 00:59:34 -0400 Original-Received: from smtp-server4.tampabay.rr.com ([65.32.1.45]) by monty-python.gnu.org with esmtp (Exim 4.10) id 184Dc8-0000wq-00; Wed, 23 Oct 2002 00:59:28 -0400 Original-Received: from GODDESS (6535194hfc48.tampabay.rr.com [65.35.194.48]) by smtp-server4.tampabay.rr.com (8.12.2/8.12.2) with SMTP id g9N4x0lb001627; Wed, 23 Oct 2002 00:59:00 -0400 (EDT) Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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:8668 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8668 This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C27A2F.745CDE10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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. ------=_NextPart_000_0001_01C27A2F.745CDE10 Content-Type: application/x-zip-compressed; name="emacs-21.3.50-play-sound-patch.zip" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="emacs-21.3.50-play-sound-patch.zip" UEsDBBQAAgAIAKoFVy0Pxk/zXgQAACcKAAAKAAAAUmVhZE1lLnR4dJ1WTW/jNhC9B8h/mKLAYrNI HMfG9tCbmxi7Rm0niL0J2otBS1RMhCIFUoqqf983pGTLqXdbFAgcfc3MmzdvZrjeKU/4E4aqIhWl TOlNOq+sIZtR3lAhymRHpaXC2TeVShL0rExqa0+JzfFWbbUklRda5tKUuI+mhRbNlbeVSQdEt5Vz eKkbsgY/01wkfh9ndDMYDz4zCF8VhXWMYdtQychCdDiYUa20Jg2AjraSnNRSeGVeAKeH92CDS1F2 Do9ijQbnZ+dn652kZCfMi/SUC6R1FJGEQ6KeMqs1Mv2VLT6RKa9NLl7lIJUZM5byk5fDk514gx8p DeU2VZlCHt5GICWHs8aXwpT0PFsuFpwvrJTBV8oAKUelWjTMNQhWCXKlna35XivzCgbKXXCk1dYJ 10Q/g/nsNxC0Zuz7CLU4OM/Zs1av8giEp8nd0+RhNh5d0u394m7+ha++3IUHi4fHS1p9nc7nfPdt NX3k/5zw8+r+9vdxpPATeZdca+WLwQ65+x+kXjgJ+STSe+vIN/nWatrA7+ZhPvljs7r/trz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