(Added jack-devel mailing list again)

Yes, I would think that jack_get_sample_rate is the only way to know the sample rate.

If qjackctl shows different information it must be a bug in qjackctl.
However, I noticed that your jack version is 7 years old. If qjackctl displayed
the wrong information in 2009, it's probably been fixed now.


On Tue, Dec 13, 2016 at 11:00 AM, ROBERT WOLF <robert.wolf@hercsmusicsystems.com.au> wrote:
In this case I would understand as follows:
1. Starting JACK server with 22050 Hz sampling rate is more-or-less a recommendation only.
2. The way to know the sampling rate for sure is to call jack_get_sample_rate.
3. I can testify that the actual sampling rate is the same as reported by jack_get_sampling_rate, because if it was not then my program would sound differently.

If my understanding is correct then I consider the case closed!

Cheers,

Robert


On 13/12/16 20:13, Kjetil Matheussen wrote:
(putting back jack-devel again)

It just says that it configures for 22050Hz, it doesn't say whether it succeeded.
So things seems to work as it should.



On Tue, Dec 13, 2016 at 10:38 AM, ROBERT WOLF <robert.wolf@hercsmusicsystems.com.au> wrote:
Two programs show this information:

1. QJackCtl.
2. When I run my own program AND jack server is not running, THEN for some reason the jack server gets started (apparently using the command stored in .jackdrc file) and I see the following printout:

jackd 0.122.0
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

JACK compiled with System V SHM support.
loading driver ..
apparent rate = 22050
creating alsa driver ... hw:PCH,0|hw:PCH,0|1024|2|22050|0|0|nomon|swmeter|-|32bit
ALSA lib conf.c:4578:(parse_args) Unknown parameter 1
ALSA lib conf.c:4711:(snd_config_expand) Parse arguments error: No such file or directory
ALSA lib control.c:953:(snd_ctl_open_noupdate) Invalid CTL hw:PCH,0
control open "hw:PCH,0" (No such file or directory)
configuring for 22050Hz, period = 1024 frames (46.4 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback

HOWEVER!!!!

jack_get_sample_rate(...); still reports 44100.

How intriguing?!



On 13/12/16 19:53, Kjetil Matheussen wrote:
Which program shows this window?

(added jack-devel mailing list back to the conversation)

On Tue, Dec 13, 2016 at 8:35 AM, ROBERT WOLF <robert.wolf@hercsmusicsystems.com.au> wrote:
There is a window with messages and it says this:

configuring for 22050Hz, period = 1024 frames (46.4 ms), buffer = 2 periods



On 13/12/16 11:09, Kjetil Matheussen wrote:


On Mon, Dec 12, 2016 at 7:33 AM, ROBERT WOLF <robert.wolf@hercsmusicsystems.com.au> wrote:
Dear All,

According to the documentation jack_get_sample_rate reports the sample rate as was used by jackd.
This does not happen in my case.
I start jackd using different sampling rates (i.e. 22050, ect.).
JACK reports that it does indeed uses the selected sampling rate.

But jack_get_sample_rate always returns 44100.

Why?


How did Jack report that it used the selected sampling rate?
I.e. where did you read that?