From xemacs-m  Tue Feb 11 17:07:18 1997
Received: from mail.uni-muenster.de (MAIL.UNI-MUENSTER.DE [128.176.6.47])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id RAA26057
	for <xemacs-beta@xemacs.org>; Tue, 11 Feb 1997 17:07:17 -0600 (CST)
Received: from cortex.corpus.uni-muenster.de (PPPE013.UNI-MUENSTER.DE [128.176.20.13]) by mail.uni-muenster.de (8.7.5/8.7.5) with ESMTP id AAA59300; Wed, 12 Feb 1997 00:06:52 +0100
Received: (from gutschk@localhost) by cortex.corpus.uni-muenster.de (8.8.2/8.8.2) id TAA09238; Tue, 11 Feb 1997 19:56:09 +0100
To: xemacs-beta@xemacs.org
Cc: Dick van den Burg <burg@is.ge.com>
Subject: Native sound support for FreeBSD
X-Face: +.[`xCMz]E6GW}5ECgY#C"Er6&v$q7:oe+zPlPtOh>/US;9B>;)ro_lpLx9/]q_{u-\YR>r
 P&)Da0gS,PW{@BWSG,PIV)3#J<$Ft_t]qa!xF~'*wuwg-CJj*0:EUr3z}y
Mime-Version: 1.0 (generated by tm-edit 7.101)
Content-Type: multipart/mixed;
 boundary="Multipart_Tue_Feb_11_19:56:07_1997-1"
Content-Transfer-Encoding: 7bit
From: Markus Gutschke <gutschk@uni-muenster.de>
Date: 11 Feb 1997 19:56:08 +0100
In-Reply-To: Steven L Baur's message of 06 Feb 1997 19:51:54 -0800
Message-ID: <m3914vrx2v.fsf_-_@cortex.corpus.uni-muenster.de>
Lines: 111
X-Mailer: Gnus v5.2.40/XEmacs 20.0

--Multipart_Tue_Feb_11_19:56:07_1997-1
Content-Type: text/plain; charset=US-ASCII

Hi,

Dick van den Burg <burg@is.ge.com> reports that the attached patch is
required to compile XEmacs with native sound support on a FreeBSD
system. He assumes that this will also work for OpenBSD and NetBSD but
does not have the resources for testing. I verified that the code
still cleanly compiles with Linux, thus I suggest that it should be
included in all of the next beta releases.


Markus


--Multipart_Tue_Feb_11_19:56:07_1997-1
Content-Type: text/plain; charset=US-ASCII

*** linuxplay.c.orig	Fri Feb  7 22:25:09 1997
--- linuxplay.c	Fri Feb  7 22:25:35 1997
***************
*** 61,67 ****
  
  #include <errno.h>
  #include <fcntl.h>
! #include <linux/soundcard.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
--- 61,71 ----
  
  #include <errno.h>
  #include <fcntl.h>
! #ifdef __FreeBSD__
! #  include <machine/soundcard.h>
! #else
! #  include <linux/soundcard.h>
! #endif
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
***************
*** 88,95 ****
  #define __inline__
  #endif
  
! static __sighandler_t sighup_handler;
! static __sighandler_t sigint_handler;
  
  /* Maintain global variable for keeping parser state information; this struct
     is set to zero before the first invocation of the parser. The use of a
--- 92,99 ----
  #define __inline__
  #endif
  
! static  void (*sighup_handler)(int);
! static  void (*sigint_handler)(int);
  
  /* Maintain global variable for keeping parser state information; this struct
     is set to zero before the first invocation of the parser. The use of a
***************
*** 982,989 ****
       this could lead to problems, when multiple sound cards are installed */
    mix_fd = audio_fd;
  
!   sighup_handler = signal(SIGHUP,(__sighandler_t)sighandler);
!   sigint_handler = signal(SIGINT,(__sighandler_t)sighandler);
  
    if (!audio_init(mix_fd,audio_fd,fmt,speed,tracks,&volume,&sndcnv))
      goto END_OF_PLAY;
--- 986,993 ----
       this could lead to problems, when multiple sound cards are installed */
    mix_fd = audio_fd;
  
!   sighup_handler = signal(SIGHUP, sighandler);
!   sigint_handler = signal(SIGINT, sighandler);
  
    if (!audio_init(mix_fd,audio_fd,fmt,speed,tracks,&volume,&sndcnv))
      goto END_OF_PLAY;
*** Makefile.in.in.orig	Fri Feb  7 23:18:21 1997
--- Makefile.in.in	Fri Feb  7 23:18:34 1997
***************
*** 320,326 ****
  #     define SOUND_CFLAGS	+e -I/usr/audio/examples 
  #   endif /* USE_GCC */
  #   define SOUND_OBJS		hpplay.o
! # elif defined (LINUX)
  #   define SOUND_CFLAGS
  #   define SOUND_OBJS		linuxplay.o
  # else
--- 320,326 ----
  #     define SOUND_CFLAGS	+e -I/usr/audio/examples 
  #   endif /* USE_GCC */
  #   define SOUND_OBJS		hpplay.o
! # elif defined (LINUX) || defined(__FreeBSD__)
  #   define SOUND_CFLAGS
  #   define SOUND_OBJS		linuxplay.o
  # else

--Multipart_Tue_Feb_11_19:56:07_1997-1
Content-Type: text/plain; charset=US-ASCII


-- 
Markus Gutschke          Internet:       gutschk@math.uni-muenster.de
Schlage 5a               PGP public key: finger -l gutschk@math.uni-muenster.de
D-48268 Greven-Gimbte
Germany                            >>> I prefer encrypted e-mail <<<

--Multipart_Tue_Feb_11_19:56:07_1997-1--

