On Tue, Feb 09, 2016 at 10:24:47AM +0000, Com?te wrote:
> Hi,
> 
> i'm using openbsd 5.8 amd64 stable.  I'm trying to record audio
> with 24-bits precision with sox and it seems to be impossible:
> 
> rec -t flac -c 2 -r 48000 -b 24 test.flac
> 
> Input File : 'default' (sndio)
> Channels : 2
> Sample Rate : 48000
> Precision : 32-bit
> Sample Encoding: 32-bit Signed Integer PCM
> 
> In:0.00% 00:00:16.90 [00:00:00.00] Out:807k [ | ] Clip:0
> 
> It is always encoded with 32-bits precision, but if i try specifying 16 
> instead of 24, it is well encoded in 16 bits.
> 
> This bug reminds me a similar one with Audacity i've already
> reported, so maybe it is the same origin ?
> 
> Is it a known bug with sox generally (however i didn't find
> anything on this) or a bug with sox only on openbsd ?  Or maybe a
> problem with my configuration ?
> 
> For information, i use this sndiod configuration :
> 
> sndiod_flags="-r 48000 -e s24le -s default"
> 

To use 24-bit precision, you have to rebuid sndiod with:

        make COPTS=-DADATA_BITS=24

and no need to add options to sndiod_flags.

Anyway, this is not what causes the problem in sox; probably
something related to the sndio bachend.  There are two variables
encoding.bits_per_sample and signal.precision, we may be using the
wrong one.

-- Alexandre

Reply via email to