diff src/sound.c @ 30079:1572612184fc

Sound support for NetBSD through "Linux emulation" support: * config.in (HAVE_SOUNDCARD_H): Undef. (HAVE_SOUND): Define if HAVE_SOUNDCARD_H. * Makefile.in (LIBSOUND): New variable. (LIBES): Include it. * sound.c [HAVE_SOUNDCARD_H]: Include <sys/ioctl.h> and <soundcard.h>. (DEFAULT_SOUND_DEVICE): Define to "/dev/dsp" if not defined elsewhere. (vox_open): Use DEFAULT_SOUND_DEVICE. * s/netbsd.h (DEFAULT_SOUND_DEVICE): Define to /dev/audio.
author Ken Raeburn <raeburn@raeburn.org>
date Wed, 05 Jul 2000 19:33:00 +0000
parents acaa36b47f50
children b3aa01baf64c
line wrap: on
line diff
--- a/src/sound.c	Wed Jul 05 19:18:52 2000 +0000
+++ b/src/sound.c	Wed Jul 05 19:33:00 2000 +0000
@@ -41,6 +41,14 @@
 #ifdef HAVE_SYS_SOUNDCARD_H
 #include <sys/soundcard.h>
 #endif
+#ifdef HAVE_SOUNDCARD_H
+#include <sys/ioctl.h>
+#include <soundcard.h>
+#endif
+
+#ifndef DEFAULT_SOUND_DEVICE
+#define DEFAULT_SOUND_DEVICE "/dev/dsp"
+#endif
 
 #define max(X, Y) ((X) > (Y) ? (X) : (Y))
 #define min(X, Y) ((X) < (Y) ? (X) : (Y))
@@ -736,7 +744,7 @@
   if (sd->file)
     file = sd->file;
   else
-    file = "/dev/dsp";
+    file = DEFAULT_SOUND_DEVICE;
   
   sd->fd = emacs_open (file, O_WRONLY, 0);
   if (sd->fd < 0)