11e5fe44a3
fuse is a free version of ZX Spectrum emulator. It emulates 48K/128K/+2/+2A machine, supports loading from .tzx files, has sound and kempston joystick emulation, emulates various printers you could attach to the Spectrum.
54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
$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;
|