Sorry. I didn't see your comment before of commit the change. On Thu, Sep 22, 2016 at 11:44:47PM +0200, Jan Stary wrote: > Before this gets OK'd I'd like to see it confonted > with ratchov's recent patch to audio/sox's sndio.c > as it seems to address a similar problem (bits_per_sample). > > Jan > > > On Sep 22 19:34:39, tso...@gmail.com wrote: > > Hi, > > > > The following diff from upstream fixes 24-bit/32-bit output > > support for cmus (I'm the maintainer). > > > > Thanks to Tobias Kortkamp for the patch! > > > > (I've also changed a pre-configure to pre-build, otherwise the first > > sed(1) could be applied twice if "make configure" is interrupted. > > Dunno if it's a really good idea.) > > > > Tested on loongson. > > > > Index: Makefile > > =================================================================== > > RCS file: /cvs/ports/audio/cmus/Makefile,v > > retrieving revision 1.12 > > diff -u -p -r1.12 Makefile > > --- Makefile 12 Sep 2016 11:45:57 -0000 1.12 > > +++ Makefile 22 Sep 2016 17:08:18 -0000 > > @@ -7,6 +7,7 @@ V= 2.7.1 > > DISTNAME= cmus-${V} > > PKGNAME-main= ${PKGNAME} > > PKGNAME-ffmpeg= cmus-ffmpeg-${V} > > +REVISION= 0 > > > > GH_ACCOUNT= cmus > > GH_PROJECT= cmus > > @@ -78,7 +79,7 @@ WANTLIB-main+= vorbis>=0 vorbisfile>=1 > > > > NO_TEST= Yes > > > > -pre-configure: > > +pre-build: > > sed -i s,/usr,${LOCALBASE}, ${WRKSRC}/Doc/cmus.txt > > sed -i s,doc/cmus/examples,examples/cmus, ${WRKSRC}/Doc/cmus.txt > > > > Index: patches/patch-sndio_c > > =================================================================== > > RCS file: patches/patch-sndio_c > > diff -N patches/patch-sndio_c > > --- /dev/null 1 Jan 1970 00:00:00 -0000 > > +++ patches/patch-sndio_c 22 Sep 2016 17:08:18 -0000 > > @@ -0,0 +1,29 @@ > > +$OpenBSD$ > > + > > +Support 32-bit/24-bit encoding > > + > > +84f33584be91 upstream > > + > > +--- sndio.c.orig Mon Jul 13 12:00:56 2015 > > ++++ sndio.c Thu Sep 22 18:54:45 2016 > > +@@ -20,7 +20,6 @@ > > + > > + #include <sys/types.h> > > + #include <sys/ioctl.h> > > +-#include <sys/audioio.h> > > + #include <sys/stat.h> > > + #include <errno.h> > > + #include <fcntl.h> > > +@@ -82,6 +81,12 @@ static int sndio_set_sf(sample_format_t sf) > > + par.le = 1; > > + > > + switch (sf_get_bits(sndio_sf)) { > > ++ case 32: > > ++ par.bits = 32; > > ++ break; > > ++ case 24: > > ++ par.bits = 24; > > ++ break; > > + case 16: > > + par.bits = 16; > > + break; > > >
-- Juan Francisco Cantero Hurtado http://juanfra.info