Eric Wong <normalper...@yhbt.net> writes: > From: Alexandre Ratchov <a...@caoua.org> > > Reported-by: Jan Stary <h...@stare.cz> > cf. http://marc.info/?l=openbsd-ports&m=147395657332262&w=2 > --- > src/sndio.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/src/sndio.c b/src/sndio.c > index e031b5bb..77785ce4 100644 > --- a/src/sndio.c > +++ b/src/sndio.c > @@ -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)
I'm not familiar with OpenBSD, so I'll trust you guys that this is correct. -- Måns Rullgård _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel