pkgsrc/sysutils/xcdroast/patches/patch-ad
shattered d229f8e4ae Update to 0.98alpha16 (plus parse_version.patch). Changes:
* merged in all patches (compile warnings fixes, locale fixes, wav detection fixes, removed pcre dependency from configure, crash fixes and version detection fixes)
* merged in several of the patches RedHat created for RPM version.
* improved current cdrtools support.
* removed extra handling for ProDVD, as this is all now integrated into the current cdrecord without any need for a key.
* updated several translations.

Fixes PR 38238.

OK by wiz@.
2009-02-11 21:48:39 +00:00

70 lines
2 KiB
Text

$NetBSD: patch-ad,v 1.5 2009/02/11 21:48:39 shattered Exp $
--- src/wavplay.c.orig 2008-08-20 15:34:02.000000000 +0000
+++ src/wavplay.c
@@ -23,6 +23,14 @@
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
+#ifdef __NetBSD__
+#include <sys/ioctl.h>
+# ifdef HAVE_OSS
+# include <soundcard.h>
+# else
+# include <sys/audioio.h>
+# endif
+#endif
#if defined(linux) || defined(__CYGWIN32__)
# include <getopt.h>
#endif
@@ -72,8 +80,8 @@ gint read_line(gint fd, gchar *ptr, gint
off_t is_std_wav_file(int f, off_t *offset);
-#if defined(linux) || defined(__FreeBSD__)
-#define DEFAULT_AUDIO_DEVICE "/dev/dsp"
+#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS))
+#define DEFAULT_AUDIO_DEVICE "@DEVOSSAUDIO@"
#elif defined (aix)
#define DEFAULT_AUDIO_DEVICE ""
#elif defined(__sgi)
@@ -309,7 +317,7 @@ int audio_write( void *buffer, int buf_s
#endif
-#if defined(linux) || defined(__FreeBSD__)
+#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS))
/* open the sound-device of linux and set cd-quality */
@@ -360,7 +368,7 @@ gint flags;
#endif
-#if defined(sun) || defined(__OpenBSD__)
+#if defined(sun) || defined(__OpenBSD__) || (defined(__NetBSD__) && !defined(HAVE_OSS))
/* open the sound-device of solaris and set cd-quality */
@@ -387,7 +395,7 @@ gint flags;
info.play.precision = 16;
info.play.encoding = AUDIO_ENCODING_LINEAR;
info.play.buffer_size = abuf_size;
-#ifndef __OpenBSD__
+#if !defined(__OpenBSD__) && !defined(__NetBSD__)
info.output_muted = 0;
#endif
@@ -787,10 +795,10 @@ gchar keybuffer[MAXLINE];
/* the open sets also the global abuf_size-variable */
-#if defined(linux) || defined(__FreeBSD__)
+#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS))
audio = open_linux_audio(audio_dev);
#endif
-#if defined(sun) || defined(__OpenBSD__)
+#if defined(sun) || defined(__OpenBSD__) || (defined(__NetBSD__) && !defined(HAVE_OSS))
audio = open_solaris_audio(audio_dev);
#endif
#ifdef aix