Re: [Jack-Devel] JACK audio format
On Tue, Sep 20, 2011 at 6:14 PM, Baek Chang <[hidden]> wrote:
> Hi,
> Is it possible to modify JACK to support different internal sample formats,
> instead of only single precision floating point?
> For example, have an argument to set the sample format during runtime? Or
> would this only be possible at compile time?
adding support for a new format is a small piece of coding (i.e.
compile time). somebody who knows what they are doing could get it
done in a couple of hours.
but ... you do not "set" the sample format. clients publish ports with
specified types.
the problem you face is that the backends only publish ports with the
current default (floating point) format. so you'd have to also modify
the relevant backend to use a different sample type. this is a bit
more work.
> bit when writing to the alsa driver. I'm wondering how much cpu usage would
> be reduced by using a fixed point format internally in JACK.
depends a lot on the CPU. on a standard, contemporary general purpose
processor, JACK is spending a miniscule amount of CPU on int<->float
conversions, even with an audio device with 26 inputs and 26 outputs.
converting to fixed point would likely save almost no CPU. of course,
you might be on CPU that only can do fixed point - that's another
story.
1316557779.24099_0.ltw:2,a <CAFa_cKkydoophpGzLbNAa6_cd+qgCJf3vCZhCuBQqtUHqOo0Vg at mail dot gmail dot com>