Another NetBSD port.

(I'm getting sick of porting MPEG players, this must be the fifth.)
This commit is contained in:
augustss 1997-11-01 00:56:20 +00:00
parent 8420169afe
commit 396f7552dd
4 changed files with 136 additions and 3 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.7 1997/10/31 22:08:34 augustss Exp $
# $NetBSD: Makefile,v 1.8 1997/11/01 00:56:20 augustss Exp $
#
SUBDIR += amp
@ -13,7 +13,7 @@
#SUBDIR += rplay
#SUBDIR += rsynth
SUBDIR += sox
#SUBDIR += splay
SUBDIR += splay
SUBDIR += timidity
#SUBDIR += tosha # needs libscsi
SUBDIR += tracker

View file

@ -0,0 +1,48 @@
diff -u ../../work/nspmod-0.1/Makefile ./Makefile
--- ../../work/nspmod-0.1/Makefile Fri Oct 31 23:04:12 1997
+++ ./Makefile Fri Oct 31 23:03:13 1997
@@ -6,12 +6,12 @@
## Linux
CFLAGS_OS = -Wall
-#CFLAGS_OS += -DDAC_DEV=\"/dev/dsp2\"
+CFLAGS_OS += -DDAC_DEV=\"/dev/audio\"
#CFLAGS_OS += -pedantic
CFLAGS_OPT = -g
CFLAGS_HIOPT = -O2 -funroll-loops
LDFLAGS_OS =
-LIBS_OS =
+LIBS_OS = -lossaudio
DACIO_ARCH = dacio-linux.c
## A certain SVR4.2 based OS
@@ -26,7 +26,7 @@
#}
#CFLAGS = $(CFLAGS_OS) $(CFLAGS_OPT) $(CFLAGS_EXT)
-CFLAGS_HIOPT_ = $(CFLAGS) $(CFLAGS_HIOPT)
+CFLAGS_HIOPT_ = $(CFLAGS) $(CFLAGS_HIOPT) $(CFLAGS_OS)
LDFLAGS = $(LDFLAGS_OS) $(LDFLAGS_EXT)
LIBS = $(LIBS_EXT) $(LIBS_OS)
@@ -37,7 +37,7 @@
inst.o hirev.o mem.o
OBJS = $(OBJS0) dacio.o
$(PROG): $(OBJS)
- $(CC) $(LDFLAGS) -o $@ $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
hirev.o: hirev.c
$(CC) $(CFLAGS_HIOPT_) -c hirev.c
diff -u ../../work/nspmod-0.1/dacio-linux.c ./dacio-linux.c
--- ../../work/nspmod-0.1/dacio-linux.c Fri Oct 31 23:04:12 1997
+++ ./dacio-linux.c Fri Oct 31 22:59:59 1997
@@ -5,6 +5,8 @@
#include <unistd.h> /*(write)*/
#if defined(LINUX)
#include <sys/soundcard.h> /*SNDCTL_XXX*/
+#elif defined(__NetBSD__)
+#include <soundcard.h>
#else
#include <machine/soundcard.h>
#endif

View file

@ -3,7 +3,8 @@
# Date created: 1 Apr 1997
# Whom: junker@jazz.snu.ac.kr
#
# $Id: Makefile,v 1.1.1.1 1997/10/28 23:19:05 augustss Exp $
# $NetBSD: Makefile,v 1.2 1997/11/01 00:56:26 augustss Exp $
# FreeBSD Id: Makefile,v 1.4 1997/08/09 23:37:33 fenner Exp
#
DISTNAME= splay-0.5
@ -11,6 +12,7 @@ CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= apps/sound/players/
# FreeBSD maintainer
MAINTAINER= junker@jazz.snu.ac.kr
GNU_CONFIGURE= yes

View file

@ -0,0 +1,83 @@
diff -r -u ../../work/splay-0.5/mpegsound/fileplayer.cc ./mpegsound/fileplayer.cc
--- ../../work/splay-0.5/mpegsound/fileplayer.cc Fri May 23 19:16:36 1997
+++ ./mpegsound/fileplayer.cc Sat Nov 1 01:38:51 1997
@@ -8,7 +8,11 @@
#include <fcntl.h>
#include "mpegsound.h"
+#ifdef __NetBSD__
+static char *defaultdevice="/dev/audio";
+#else
static char *defaultdevice="/dev/dsp";
+#endif
// Wave file player
bool Wavefileplayer::openfile(char *filename,char *device)
diff -r -u ../../work/splay-0.5/mpegsound/rawplayer.cc ./mpegsound/rawplayer.cc
--- ../../work/splay-0.5/mpegsound/rawplayer.cc Sat Nov 1 01:39:50 1997
+++ ./mpegsound/rawplayer.cc Sat Nov 1 01:27:58 1997
@@ -8,7 +8,11 @@
#include <fcntl.h>
#include <sys/ioctl.h>
+#ifdef __NetBSD__
+#include <soundcard.h>
+#else
#include <machine/soundcard.h>
+#endif
#include "mpegsound.h"
diff -r -u ../../work/splay-0.5/src/Makefile.in ./src/Makefile.in
--- ../../work/splay-0.5/src/Makefile.in Wed May 28 13:18:08 1997
+++ ./src/Makefile.in Sat Nov 1 01:31:25 1997
@@ -69,6 +69,8 @@
LIBS = @LIBS@
+LIBS += -lossaudio
+
SUBDIRS = cmd @XQTDIR@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
diff -r -u ../../work/splay-0.5/src/cmd/cmd.cc ./src/cmd/cmd.cc
--- ../../work/splay-0.5/src/cmd/cmd.cc Sat Nov 1 01:39:50 1997
+++ ./src/cmd/cmd.cc Sat Nov 1 01:34:20 1997
@@ -15,7 +15,11 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
+#ifdef __NetBSD__
+#include <soundcard.h>
+#else
#include <machine/soundcard.h>
+#endif
#include <mpegsound.h>
@@ -357,7 +361,7 @@
" -W : playing wave as standard input\n"
" -V : show version\n"
" -d device : play raw data(Not wave format) to device\n"
- " default : /dev/dsp\n"
+ " default : /dev/audio\n"
"\t\tIf first character of devicename \'/\',\n"
"\t\t\tregard device,\n"
"\t\tIf first character of devicename \'-\',\n"
diff -r -u ../../work/splay-0.5/src/xqt/xsplay.cc ./src/xqt/xsplay.cc
--- ../../work/splay-0.5/src/xqt/xsplay.cc Wed May 28 09:38:59 1997
+++ ./src/xqt/xsplay.cc Sat Nov 1 01:36:57 1997
@@ -232,7 +232,12 @@
// Player
- if(device==NULL)device="/dev/dsp";
+ if(device==NULL)
+#ifdef __NetBSD__
+ device="/dev/audio";
+#else
+ device="/dev/dsp";
+#endif
if(device[0]=='/')player=new Rawplayer;
else