Simple question about sample rates

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Simple question about sample rates

Wim Lewis
I'm taking a stab at writing a driver for jackd to use BSD's native audio
interface (avoiding the doubly-deprecated OSS emulation layers). One thing
I'm a little unclear on is the handling of sample rates (and relatedly,
buffer sizes and cycle frequency). Whose responsibility is it to control
those? The existing OSS driver sets it when it starts up, based on the
paramters it's passed; and afterwards it attempts to obey changes made by
other clients (?). What's the right behavior if the sample rate gets set
to something the hardware doesn't support?

Also, is it possible for different (non-connected) subgraphs to have
different sample rates & cycle times, or do all ports in a given jackd
have the same timing properties?



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: Simple question about sample rates

Jack O'Quin-2
Wim Lewis <[hidden email]> writes:

> I'm taking a stab at writing a driver for jackd to use BSD's native
> audio interface (avoiding the doubly-deprecated OSS emulation
> layers). One thing I'm a little unclear on is the handling of sample
> rates (and relatedly, buffer sizes and cycle frequency). Whose
> responsibility is it to control those? The existing OSS driver sets it
> when it starts up, based on the paramters it's passed; and afterwards
> it attempts to obey changes made by other clients (?). What's the
> right behavior if the sample rate gets set to something the hardware
> doesn't support?

I don't know.

> Also, is it possible for different (non-connected) subgraphs to have
> different sample rates & cycle times, or do all ports in a given jackd
> have the same timing properties?

All JACK clients share the same sample rate and cycle time.
--
  joq


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: Simple question about sample rates

Paul Davis
On Sun, 2005-07-10 at 22:41 -0500, Jack O'Quin wrote:

> Wim Lewis <[hidden email]> writes:
>
> > I'm taking a stab at writing a driver for jackd to use BSD's native
> > audio interface (avoiding the doubly-deprecated OSS emulation
> > layers). One thing I'm a little unclear on is the handling of sample
> > rates (and relatedly, buffer sizes and cycle frequency). Whose
> > responsibility is it to control those? The existing OSS driver sets it
> > when it starts up, based on the paramters it's passed; and afterwards
> > it attempts to obey changes made by other clients (?). What's the
> > right behavior if the sample rate gets set to something the hardware
> > doesn't support?
>
> I don't know.

what happens is that the backend should pick the closest available rate,
and report that. this happens to me all the time with a builtin chipset
in my laptop - it only supports 48kHz, so if I attempt to run JACK at
44.1kHz, we get 48kHz and this is reported back to all clients and
jackd. A year ago, the same thing happened without the actual rate being
reported by the backend, which was very confusing.

it is of course debatable whether the backend should simply fail if the
requested SR is not available.

--p




-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel