the diff was forgotten, it's discussed here:

http://marc.info/?l=openbsd-ports&m=145505706611958

It's about playing 24-bit files with full precision (assuming audio
sub-system supports it), i.e.  without converting samples to 16-bit
first and loosing 8-bits of precision.

OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/sox/Makefile,v
retrieving revision 1.65
diff -u -p -r1.65 Makefile
--- Makefile    12 Sep 2016 22:20:36 -0000      1.65
+++ Makefile    14 Sep 2016 06:22:03 -0000
@@ -5,6 +5,7 @@ BROKEN-hppa =   bend.c:155:12: internal co
 COMMENT=       Sound eXchange, the Swiss Army knife of audio manipulation
 
 DISTNAME=      sox-14.4.2
+REVISION=      0
 SHARED_LIBS += sox 4.0 # 3.0
 
 CATEGORIES=    audio
Index: patches/patch-src_sndio_c
===================================================================
RCS file: patches/patch-src_sndio_c
diff -N patches/patch-src_sndio_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_sndio_c   14 Sep 2016 06:22:03 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+--- src/sndio.c.orig   Mon Jan 30 04:01:44 2012
++++ src/sndio.c        Tue Feb  9 23:23:00 2016
+@@ -113,8 +113,6 @@ static int startany(sox_format_t *ft, unsigned mode)
+     else
+       reqpar.rchan = ft->signal.channels;
+   }
+-  if (ft->signal.precision > 0)
+-    reqpar.bits = ft->signal.precision;
+   switch (ft->encoding.encoding) {
+   case SOX_ENCODING_SIGN2:
+     reqpar.sig = 1;
+@@ -127,6 +125,12 @@ static int startany(sox_format_t *ft, unsigned mode)
+   }
+   if (ft->encoding.bits_per_sample > 0)
+     reqpar.bits = ft->encoding.bits_per_sample;
++  else if (ft->signal.precision > 0)
++    reqpar.bits = ft->signal.precision;
++  else
++    reqpar.bits = SOX_DEFAULT_PRECISION;
++  reqpar.bps = (reqpar.bits + 7) / 8;
++  reqpar.msb = 1;
+   if (ft->encoding.reverse_bytes != sox_option_default) {
+     reqpar.le = SIO_LE_NATIVE;
+     if (ft->encoding.reverse_bytes)

Reply via email to