Commit 80fcd514 authored by Ken Raeburn's avatar Ken Raeburn
Browse files

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.
parent b192d653
2000-07-05 Ken Raeburn <raeburn@gnu.org>
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.
2000-07-05 Gerd Moellmann <gerd@gnu.org>
 
* print.c (print_error_message): If Vsignaling_function is set,
......
......@@ -417,6 +417,8 @@ LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM
#endif /* not HAVE_X11 */
#endif /* not HAVE_X_WINDOWS */
LIBSOUND= @LIBSOUND@
#ifndef ORDINARY_LINK
/* Fix linking if compiled with GCC. */
#ifdef __GNUC__
......@@ -794,7 +796,8 @@ SOME_MACHINE_LISP = ${dotdot}/lisp/menu-bar.elc ${dotdot}/lisp/mouse.elc \
Note that SunOS needs -lm to come before -lc; otherwise, you get
duplicated symbols. If the standard libraries were compiled
with GCC, we might need gnulib again after them. */
LIBES = $(LOADLIBES) $(LIBS) $(LIBX) LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) \
LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
LIBS_DEBUG $(GETLOADAVG_LIBS) $(GNULIB_VAR) LIB_MATH LIB_STANDARD \
$(GNULIB_VAR)
......
......@@ -136,6 +136,7 @@ Boston, MA 02111-1307, USA. */
/* Header for Voxware or PCM sound card driver. */
#undef HAVE_MACHINE_SOUNDCARD_H
#undef HAVE_SYS_SOUNDCARD_H
#undef HAVE_SOUNDCARD_H
/* Define HAVE_SOUND if we have sound support. */
#ifdef HAVE_MACHINE_SOUNDCARD_H
......@@ -144,6 +145,9 @@ Boston, MA 02111-1307, USA. */
#ifdef HAVE_SYS_SOUNDCARD_H
#define HAVE_SOUND 1
#endif
#ifdef HAVE_SOUNDCARD_H
#define HAVE_SOUND 1
#endif
/* Some things figured out by the configure script, grouped as they are in
configure.in. */
......
......@@ -87,3 +87,5 @@
#define LINKER $(CC) -nostartfiles
#define NARROWPROTO 1
#define DEFAULT_SOUND_DEVICE "/dev/audio"
......@@ -41,6 +41,14 @@ Boston, MA 02111-1307, USA. */
#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 @@ vox_open (sd)
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment