shithub: sox

Download patch

ref: bba0bddc87c09d85e858eb8f48f7f67656777959
parent: db958a4e1733afc8e0c612f5e92e33f92a0bbfa4
author: cbagwell <cbagwell>
date: Sat Jan 13 14:16:56 EST 2001

Merged in NetBSD patches.  Most a warning cleanups.

--- a/Changelog
+++ b/Changelog
@@ -17,6 +17,9 @@
     were used.
   o Geoff Kuenning updated play/rec/soxeffect scripts to handle all effects
     added since 12.17. Spell-checked soxexam.1 file.
+  o Jimen Ching updated ALSA configure support to auto-detect 4.x or 5.x API
+    and compile correctly under those two.  All other versions are unsupported.
+  o Merged in the NetBSD package changes into CVS finally.
 
 sox-12.17.1
 -----------
--- a/play
+++ b/play
@@ -180,6 +180,12 @@
 	device="/dev/dsp"
     fi
     ;;
+  NetBSD)
+    arch_defines="-t sunau"
+    if [ -z "$device" ]; then
+        device="/dev/audio"
+    fi
+    ;;
 esac
 
 # If name is "rec" then record else assume user is wanting to play
--- a/src/au.c
+++ b/src/au.c
@@ -22,6 +22,7 @@
 #include "st.h"
 #include "g72x.h"
 #include <stdlib.h>
+#include <string.h>
 
 /* Magic numbers used in Sun and NeXT audio files */
 #define SUN_MAGIC 	0x2e736e64		/* Really '.snd' */
--- a/src/avr.c
+++ b/src/avr.c
@@ -38,7 +38,7 @@
   unsigned short midi; /* 0xffff = no MIDI note assigned,
 			  0xffXX = single key note assignment
 			  0xLLHH = key split, low/hi note */
-  ULONG int rate;	       /* sample frequency in hertz */
+  ULONG rate;	       /* sample frequency in hertz */
   ULONG size;	       /* sample length in bytes or words (see rez) */
   ULONG lbeg;	       /* offset to start of loop in bytes or words.
 			  set to zero if unused. */
--- a/src/copy.c
+++ b/src/copy.c
@@ -12,6 +12,7 @@
  */
 
 #include "st.h"
+#include "string.h" /* memcpy() */
 
 /*
  * Process options
--- a/src/pitch.c
+++ b/src/pitch.c
@@ -38,6 +38,7 @@
 #include "st.h"
 
 #include <stdlib.h> /* malloc(), free() */
+#include <string.h> /* memcpy() */
 
 #include <math.h>   /* cos(), pow() */
 #include <limits.h> /* LONG_MAX */
--- a/src/polyphas.c
+++ b/src/polyphas.c
@@ -32,6 +32,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <limits.h>
+#include <string.h>
 #include "st.h"
 
 #define Float float/*double*/
--- a/src/resample.c
+++ b/src/resample.c
@@ -53,6 +53,7 @@
 
 #include <math.h>
 #include <stdlib.h>
+#include <string.h>
 #include "st.h"
 
 /* resample includes */
@@ -180,11 +181,11 @@
 	resample_t r = (resample_t) effp->priv;
 	LONG Xoff, gcdrate;
 	int i;
-	extern long st_gcd(P2(long a,long b));
+	extern LONG st_gcd(P2(LONG a,LONG b));
 
 	r->Factor = (double)effp->outinfo.rate / (double)effp->ininfo.rate;
 
-	gcdrate = st_gcd((long)effp->ininfo.rate, (long)effp->outinfo.rate);
+	gcdrate = st_gcd((LONG)effp->ininfo.rate, (LONG)effp->outinfo.rate);
 	r->a = effp->ininfo.rate / gcdrate;
 	r->b = effp->outinfo.rate / gcdrate;
 
--- a/src/stretch.c
+++ b/src/stretch.c
@@ -23,6 +23,7 @@
 
 #include <stdlib.h> /* malloc and free */
 #include <limits.h> /* LONG_MAX */
+#include <string.h> /* memcpy() */
 
 #ifndef MIN
 #define MIN(s1,s2) ((s1)<(s2)?(s1):(s2))
--- a/src/sunaudio.c
+++ b/src/sunaudio.c
@@ -17,7 +17,10 @@
  */
 
 #include <sys/ioctl.h>
-#ifdef __SVR4
+#if defined(__SVR4) || define(__NeBSD__)
+#ifdef __NetBSD__
+#include <sys/types.h>  /* This should be in audioio.h itself but its not */
+#endif
 #include <sys/audioio.h>
 #else
 #include <sun/audioio.h>
--- a/src/trim.c
+++ b/src/trim.c
@@ -12,6 +12,7 @@
  */
 
 #include "st.h"
+#include <string.h>
 
 /* Time resolutin one millisecond */
 #define TIMERES 1000