Update to fuse-0.4.2; from maintainer Alexander Yurchenko <grange@rt.mipt.ru>
This commit is contained in:
parent
1897ae0b9c
commit
43d671595d
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2002/02/27 00:37:10 naddy Exp $
|
||||
# $RuOBSD: Makefile,v 1.4 2002/02/12 02:37:09 grange Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2002/04/21 04:06:55 pvalchev Exp $
|
||||
# $RuOBSD: Makefile,v 1.7 2002/03/26 19:14:05 grange Exp $
|
||||
|
||||
COMMENT= "Free Unix Spectrum Emulator"
|
||||
|
||||
DISTNAME= fuse-0.4.1
|
||||
DISTNAME= fuse-0.4.2
|
||||
CATEGORIES= emulators
|
||||
NEED_VERSION= 1.504
|
||||
NEED_VERSION= 1.524
|
||||
|
||||
HOMEPAGE= http://www.srcf.ucam.org/~pak21/spectrum/fuse.html
|
||||
|
||||
@ -34,8 +34,4 @@ LIB_DEPENDS= gtk.1.2,gdk.1.2::x11/gtk+
|
||||
CONFIGURE_ARGS= --without-gtk
|
||||
.endif
|
||||
|
||||
post-extract:
|
||||
@ln -s ${FILESDIR}/sunsound.c ${WRKSRC}
|
||||
@ln -s ${FILESDIR}/sunsound.h ${WRKSRC}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (fuse-0.4.1.tar.gz) = 938d993293f318376e1ba8ca9cf9cecb
|
||||
RMD160 (fuse-0.4.1.tar.gz) = c0745aa268b6a1e14345f2d6a676a1c61b3d0799
|
||||
SHA1 (fuse-0.4.1.tar.gz) = e765fed04d3bd1fc03193af12273144a06a4f9ce
|
||||
MD5 (fuse-0.4.2.tar.gz) = a4abf7d0491ab4db3a5baab454ad8f22
|
||||
RMD160 (fuse-0.4.2.tar.gz) = 0662e14d51d6c25df03cf8bdd786376d2b01ab14
|
||||
SHA1 (fuse-0.4.2.tar.gz) = 6c709105ae3fcb3fb8786969053e0723a1d66a5c
|
||||
|
@ -1,126 +0,0 @@
|
||||
/* $OpenBSD: sunsound.c,v 1.1.1.1 2002/02/27 00:37:10 naddy Exp $ */
|
||||
/* $RuOBSD: sunsound.c,v 1.2 2002/02/12 01:52:18 grange Exp $ */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if defined(HAVE_SYS_AUDIOIO_H) /* SUN sound */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/audioio.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sunsound.h"
|
||||
|
||||
/* using (8) 64 byte frags for 8kHz, scale up for higher */
|
||||
#define BASE_SOUND_FRAG_PWR 6
|
||||
|
||||
static int soundfd = -1;
|
||||
static int sixteenbit = 0;
|
||||
|
||||
int
|
||||
sunsound_init(freqptr, stereoptr)
|
||||
int *freqptr, *stereoptr;
|
||||
{
|
||||
int frag;
|
||||
struct audio_info ai;
|
||||
|
||||
if ((soundfd = open("/dev/audio", O_WRONLY)) == -1)
|
||||
return 1;
|
||||
|
||||
AUDIO_INITINFO(&ai);
|
||||
|
||||
ai.play.encoding = AUDIO_ENCODING_ULINEAR;
|
||||
ai.play.precision = 8;
|
||||
if (ioctl(soundfd, AUDIO_SETINFO, &ai) == -1) {
|
||||
/* try 16-bit, may be a 16-bit only device */
|
||||
ai.play.precision = 16;
|
||||
if (ioctl(soundfd, AUDIO_SETINFO, &ai) == -1) {
|
||||
close(soundfd);
|
||||
return 1;
|
||||
}
|
||||
sixteenbit = 1;
|
||||
}
|
||||
|
||||
ai.play.channels = *stereoptr ? 2 : 1;
|
||||
if (ioctl(soundfd, AUDIO_SETINFO, &ai) == -1) {
|
||||
/* if it failed make sure the opposite is ok */
|
||||
ai.play.channels = *stereoptr ? 1 : 2;
|
||||
if (ioctl(soundfd, AUDIO_SETINFO, &ai) == -1) {
|
||||
close(soundfd);
|
||||
return 1;
|
||||
}
|
||||
*stereoptr = *stereoptr ? 1 : 2;
|
||||
}
|
||||
|
||||
ai.play.sample_rate = *freqptr;
|
||||
if (ioctl(soundfd, AUDIO_SETINFO, &ai) == -1) {
|
||||
close(soundfd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
frag = 0x80000 | BASE_SOUND_FRAG_PWR;
|
||||
if (*freqptr > 8250)
|
||||
frag++;
|
||||
if (*freqptr > 16500)
|
||||
frag++;
|
||||
if (*freqptr > 33000)
|
||||
frag++;
|
||||
if (*stereoptr)
|
||||
frag++;
|
||||
if (sixteenbit)
|
||||
frag++;
|
||||
ai.blocksize = 1 << (frag & 0xffff);
|
||||
ai.hiwat = ((unsigned)frag >> 16) & 0x7fff;
|
||||
if (ai.hiwat == 0)
|
||||
ai.hiwat = 65536;
|
||||
if (ioctl(soundfd, AUDIO_SETINFO, &ai) == -1) {
|
||||
close(soundfd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
sunsound_end()
|
||||
{
|
||||
ioctl(soundfd, AUDIO_FLUSH);
|
||||
close(soundfd);
|
||||
}
|
||||
|
||||
void
|
||||
sunsound_frame(data, len)
|
||||
unsigned char *data;
|
||||
int len;
|
||||
{
|
||||
unsigned char buf16[8192];
|
||||
int ret=0, ofs=0;
|
||||
|
||||
if (sixteenbit) {
|
||||
unsigned char *src, *dst;
|
||||
int f;
|
||||
|
||||
src = data;
|
||||
dst = buf16;
|
||||
for (f = 0; f < len; f++) {
|
||||
*dst++ = 128;
|
||||
*dst++ = *src++ - 128;
|
||||
}
|
||||
|
||||
data = buf16;
|
||||
len <<= 1;
|
||||
}
|
||||
|
||||
while (len) {
|
||||
if ((ret = write(soundfd, data + ofs, len)) == -1)
|
||||
break;
|
||||
ofs += ret;
|
||||
len -= ret;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* HAVE_SYS_AUDIOIO_H */
|
@ -1,11 +0,0 @@
|
||||
/* $OpenBSD: sunsound.h,v 1.1.1.1 2002/02/27 00:37:10 naddy Exp $ */
|
||||
/* $RuOBSD: sunsound.h,v 1.1 2002/02/11 22:56:25 grange Exp $ */
|
||||
|
||||
#ifndef FUSE_SUNSOUND_H
|
||||
#define FUSE_SUNSOUND_H
|
||||
|
||||
int sunsound_init(int *, int *);
|
||||
void sunsound_end(void);
|
||||
void sunsound_frame(unsigned char *, int);
|
||||
|
||||
#endif /* FUSE_SUNSOUND_H */
|
@ -1,52 +0,0 @@
|
||||
$OpenBSD: patch-Makefile_in,v 1.1.1.1 2002/02/27 00:37:10 naddy Exp $
|
||||
$RuOBSD: patch-Makefile_in,v 1.2 2002/02/12 02:37:09 grange Exp $
|
||||
--- Makefile.in.orig Tue Feb 5 02:05:57 2002
|
||||
+++ Makefile.in Tue Feb 12 04:45:33 2002
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
SUBDIRS = lib libspectrum man myglib roms ui utils widget z80
|
||||
|
||||
-fuse_SOURCES = ay.c display.c event.c fuse.c keyboard.c keysyms.c machine.c osssound.c settings.c snapshot.c sound.c spec128.c spec48.c specplus2.c specplus3.c spectrum.c tape.c timer.c uidisplay.c utils.c joystick.c printer.c
|
||||
+fuse_SOURCES = ay.c display.c event.c fuse.c keyboard.c keysyms.c machine.c osssound.c sunsound.c settings.c snapshot.c sound.c spec128.c spec48.c specplus2.c specplus3.c spectrum.c tape.c timer.c uidisplay.c utils.c joystick.c printer.c
|
||||
|
||||
|
||||
BUILT_SOURCES = keysyms.c
|
||||
@@ -85,7 +85,7 @@
|
||||
LDADD = @GLIB_LIBS@ @GTK_LIBS@ libspectrum/libspectrum.a myglib/libmyglib.a ui/aalib/libuiaalib.a ui/fb/libuifb.a ui/gtk/libuigtk.a ui/svga/libuisvga.a ui/xlib/libuixlib.a widget/libwidget.a z80/libz80.a
|
||||
|
||||
|
||||
-noinst_HEADERS = ay.h display.h event.h fuse.h keyboard.h keysyms.h machine.h osssound.h settings.h snapshot.h sound.h spec128.h spec48.h specplus2.h specplus3.h spectrum.h tape.h timer.h types.h utils.h joystick.h printer.h
|
||||
+noinst_HEADERS = ay.h display.h event.h fuse.h keyboard.h keysyms.h machine.h osssound.h sunsound.h settings.h snapshot.h sound.h spec128.h spec48.h specplus2.h specplus3.h spectrum.h tape.h timer.h types.h utils.h joystick.h printer.h
|
||||
|
||||
|
||||
EXTRA_DIST = AUTHORS README THANKS hacking/ui.txt keysyms.dat keysyms.pl
|
||||
@@ -105,9 +105,9 @@
|
||||
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||
X_PRE_LIBS = @X_PRE_LIBS@
|
||||
fuse_OBJECTS = ay.o display.o event.o fuse.o keyboard.o keysyms.o \
|
||||
-machine.o osssound.o settings.o snapshot.o sound.o spec128.o spec48.o \
|
||||
-specplus2.o specplus3.o spectrum.o tape.o timer.o uidisplay.o utils.o \
|
||||
-joystick.o printer.o
|
||||
+machine.o osssound.o sunsound.o settings.o snapshot.o sound.o spec128.o \
|
||||
+spec48.o specplus2.o specplus3.o spectrum.o tape.o timer.o uidisplay.o \
|
||||
+utils.o joystick.o printer.o
|
||||
fuse_LDADD = $(LDADD)
|
||||
fuse_DEPENDENCIES = libspectrum/libspectrum.a myglib/libmyglib.a \
|
||||
ui/aalib/libuiaalib.a ui/fb/libuifb.a ui/gtk/libuigtk.a \
|
||||
@@ -390,6 +390,7 @@
|
||||
display.h spectrum.h spec48.h spec128.h specplus2.h specplus3.h \
|
||||
tape.h utils.h z80/z80.h
|
||||
osssound.o: osssound.c config.h types.h sound.h spectrum.h osssound.h
|
||||
+sunsound.o: sunsound.c config.h sunsound.h
|
||||
printer.o: printer.c config.h fuse.h machine.h ay.h types.h display.h \
|
||||
spectrum.h printer.h
|
||||
settings.o: settings.c config.h fuse.h machine.h ay.h types.h display.h \
|
||||
@@ -397,7 +398,7 @@
|
||||
snapshot.o: snapshot.c config.h display.h types.h fuse.h \
|
||||
libspectrum/libspectrum.h machine.h ay.h spectrum.h sound.h \
|
||||
snapshot.h spec128.h utils.h z80/z80.h z80/z80_macros.h
|
||||
-sound.o: sound.c config.h osssound.h fuse.h machine.h ay.h types.h \
|
||||
+sound.o: sound.c config.h osssound.h sunsound.h fuse.h machine.h ay.h types.h \
|
||||
display.h spectrum.h settings.h sound.h
|
||||
spec128.o: spec128.c config.h ay.h types.h display.h fuse.h joystick.h \
|
||||
keyboard.h machine.h spectrum.h snapshot.h sound.h spec128.h \
|
@ -1,14 +0,0 @@
|
||||
$OpenBSD: patch-config_h_in,v 1.1.1.1 2002/02/27 00:37:10 naddy Exp $
|
||||
$RuOBSD: patch-config_h_in,v 1.1 2002/02/11 22:54:34 grange Exp $
|
||||
--- config.h.in.orig Sat Feb 9 17:41:51 2002
|
||||
+++ config.h.in Sat Feb 9 17:41:54 2002
|
||||
@@ -80,6 +80,9 @@
|
||||
/* Define if you have the <sys/soundcard.h> header file. */
|
||||
#undef HAVE_SYS_SOUNDCARD_H
|
||||
|
||||
+/* Define if you have the <sys/audioio.h> header file. */
|
||||
+#undef HAVE_SYS_AUDIOIO_H
|
||||
+
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-configure,v 1.1.1.1 2002/02/27 00:37:10 naddy Exp $
|
||||
--- configure.orig Tue Feb 26 22:29:50 2002
|
||||
+++ configure Tue Feb 26 22:30:05 2002
|
||||
@@ -1370,7 +1370,7 @@ EOF
|
||||
|
||||
fi
|
||||
|
||||
-for ac_hdr in sys/time.h unistd.h sys/soundcard.h
|
||||
+for ac_hdr in sys/time.h unistd.h sys/soundcard.h sys/audioio.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
@ -1,53 +0,0 @@
|
||||
$OpenBSD: patch-sound_c,v 1.1.1.1 2002/02/27 00:37:10 naddy Exp $
|
||||
$RuOBSD: patch-sound_c,v 1.1 2002/02/11 22:54:34 grange Exp $
|
||||
--- sound.c.orig Sat Feb 9 17:52:59 2002
|
||||
+++ sound.c Sat Feb 9 17:52:02 2002
|
||||
@@ -47,6 +47,9 @@
|
||||
#if defined(HAVE_SYS_SOUNDCARD_H)
|
||||
#include "osssound.h"
|
||||
#endif
|
||||
+#if defined(HAVE_SYS_AUDIOIO_H)
|
||||
+#include "sunsound.h"
|
||||
+#endif
|
||||
|
||||
#include "fuse.h"
|
||||
#include "machine.h"
|
||||
@@ -177,7 +180,7 @@
|
||||
int f,ret;
|
||||
|
||||
/* if we don't have any sound I/O code compiled in, don't do sound */
|
||||
-#if !defined(HAVE_SYS_SOUNDCARD_H) /* only type for now */
|
||||
+#if !defined(HAVE_SYS_SOUNDCARD_H) && !defined(HAVE_SYS_AUDIOIO_H)
|
||||
return;
|
||||
#endif
|
||||
|
||||
@@ -199,6 +202,9 @@
|
||||
#if defined(HAVE_SYS_SOUNDCARD_H)
|
||||
ret=osssound_init(&sound_freq,&sound_stereo);
|
||||
#endif
|
||||
+#if defined(HAVE_SYS_AUDIOIO_H)
|
||||
+ret=sunsound_init(&sound_freq,&sound_stereo);
|
||||
+#endif
|
||||
|
||||
if(ret)
|
||||
return;
|
||||
@@ -294,6 +300,9 @@
|
||||
#if defined(HAVE_SYS_SOUNDCARD_H)
|
||||
osssound_end();
|
||||
#endif
|
||||
+#if defined(HAVE_SYS_AUDIOIO_H)
|
||||
+ sunsound_end();
|
||||
+#endif
|
||||
sound_enabled=0;
|
||||
}
|
||||
}
|
||||
@@ -758,6 +767,9 @@
|
||||
|
||||
#if defined(HAVE_SYS_SOUNDCARD_H)
|
||||
osssound_frame(sound_buf,sound_framesiz*sound_channels);
|
||||
+#endif
|
||||
+#if defined(HAVE_SYS_AUDIOIO_H)
|
||||
+sunsound_frame(sound_buf,sound_framesiz*sound_channels);
|
||||
#endif
|
||||
|
||||
sound_oldpos[0]=sound_oldpos[1]=-1;
|
Loading…
Reference in New Issue
Block a user