[PlanetCCRMA] A general Jack question - which bit depth is used?

Fernando Pablo Lopez-Lezcano nando@ccrma.Stanford.EDU
Wed Jan 14 11:04:02 2004


> Here is something I have been wondering for a while and did not find in any online
> documentation:
> 
> Jack handles audio with a certain sample rate and other parameters. Ardour saves 
> the recorded audio as 32-bit float. Given that my hardware does the AD conversion 
> with at 16-bit the audio has to bo converted to 32-bit at some point.
> 
> At which point does this happen?

I have not looked at the source but that should happen as soon as the
samples are received from the soundcard (inside jack's alsa driver).
Jack's audio ports are (each one) mono and always transmit and receive
32 bit floats at the sampling rate selected when you start Jack. 

> In other words:
> 
> Does Jack always use the same bit depth for the transmitted audio or is there 
> variation between different Jack clients and settings? 

It is always the same. 

> If it is always the same, 
> is this bit depth defined by the ALSA settings and the hardware or is it something 
> else?

It is "hardwired" into Jack's design. If your hardware can do 24 or 32
bits then jack will open the alsa driver with the proper parameters,
otherwise it will just use 16 bits. On the outputs you can specify if
Jack will do dithering to try to minimize noise (when going down from 32
bits to the outgoing 16 bit soundcard). 

-- Fernando