Re: [Jack-Devel] jack vs devices

PrevNext  Index
DateSat, 01 Sep 2012 08:56:13 -0400
From Paul Davis <[hidden] at linuxaudiosystems dot com>
ToPatrick Shirkey <[hidden] at boosthardware dot com>
Cc[hidden] at lists dot jackaudio dot org
In-Reply-ToPatrick Shirkey [Jack-Devel] jack vs devices
Follow-UpPatrick Shirkey Re: [Jack-Devel] jack vs devices
On Sat, Sep 1, 2012 at 2:41 AM, Patrick Shirkey
<[hidden]>wrote:

> Hi,
>
> A few questions that I couldn't see answers to in the API docs.
>
> Does jack have a way to query a devices capabilities like available sample
> rates, period sizes, number of ports, etc...
>

i'm not sure what you mean. if you mean, can clients make calls to discover
this, then yes and no. clients can certainly get the sample rate, the
period ("buffer") size, and enumerate all ports, etc. JACK itself does not
provide any API that is device-oriented (other than marking ports as
"physical") because we do not want clients trying to treat i/o to and from
devices differently than i/o to and from other clients. as for JACK itself
trying to discover possible sample rates, almost no complete audio device
API provides this, since it is actually part of the problem of a very
sparse multidimensional state space - each parameter of an audio device can
depend on the other parameters (e.g. the number of channels can depend on
the sample rate, or vice versa). so JACK simply tries to configure things
as the user asked, and then checks that it worked, at least somewhat.


> If I reset the sample rate or period size do I need to restart the server
> every time?
>

jack_set_buffer_size() can be used by any client to change the period size
(though it may fail if you give it an illegal value).

currently (and since JACK's inception) there is no API call to change the
sample rate. we decided long ago that it placed too much of a burden on
clients. this may have been a mistake.
PrevNext  Index

1346504182.31114_0.ltw:2,a <CAFa_cKk5ya1JwZukusxi6Qs=1bhVxUEa3AzWH6H_DOM0W83mYA at mail dot gmail dot com>