Re: [pulseaudio-discuss] No Use for JACK Transport

2007-07-30 Thread Lennart Poettering
On Wed, 25.07.07 13:39, Tanu Kaskinen ([EMAIL PROTECTED]) wrote:

 That is totally unnecessary, except that the modules seem to
 use the JACK transport API to calculate the latency
 accurately. In my patched JACK sink (see #91) the latency is
 a multiple of the processing block size and pretty much
 constant. That's been working fine for me, but if a more
 accurate calculation is required, the jack_frame_time and
 jack_last_frame_time functions can probably be used.

Hmm. The more exact the timing is we get the better we can do lip-sync
audio. If the hw supports it we want sample-exact latency
measurements. I am very sure that just block granularity is
insufficient.

 OT: I used the term processing block size in the previous
 paragraph. What's your preferred term? The JACK api calls it
 buffer size, in my code I call it block size, it also could
 be fragment size or chunk size etc. I recall you had a
 discussion in IRC about similar terminology, and even though
 it wasn't related to JACK, I think you have a clear opinion
 about this and I'd like to consistently conform to it.

In PA I try to do without the term block size as much as
possible. PA doesn't enforce a fixed block size anywhere. We take what
we get and try to keep the memory blocks as large as possible, as
small as necessary.

Some people call it fragment size, others call it period size, even others
call it block size, frame size or buffer size or whatever.

In PA I try to follow the following rules:

memblock: a non-mutable, ref-counted, variable-sized area in memory
memchunk: a fraction of a memblock, also variable-sized
sample: a single sample value for a single channel
frame: multiple samples, one for each channel in the context

Because OSS and ALSA require the notion of fragments/periods we follow
their notion in the respective driver modules. fragment is mostly
synonymous to period here. And the buffer is the concatenation of
a number of fragments/periods. So that buffer_size=frag_size*nfrags.

Confusing? Yes, of course!

Lennart

-- 
Lennart PoetteringRed Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/   GnuPG 0x1A015CC4
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] No Use for JACK Transport

2007-07-25 Thread Tanu Kaskinen
On Wed, Jul 25, 2007 at 02:46:38AM +0200, Lennart Poettering wrote:
 On Fri, 13.07.07 03:22, Esben Stien ([EMAIL PROTECTED]) wrote:
 
  There is no use for JACK transport in pulseaudio. As it is now,
  pulseaudio won't output JACK audio when the transport is off. This is
  wrong.
 
 I am sorry? I don't understand?

Esben refers to the known misbehaviour in the JACK modules -
they don't do anything unless
jack_transport_query(u-client, NULL) == JackTransportRolling

That is totally unnecessary, except that the modules seem to
use the JACK transport API to calculate the latency
accurately. In my patched JACK sink (see #91) the latency is
a multiple of the processing block size and pretty much
constant. That's been working fine for me, but if a more
accurate calculation is required, the jack_frame_time and
jack_last_frame_time functions can probably be used.

OT: I used the term processing block size in the previous
paragraph. What's your preferred term? The JACK api calls it
buffer size, in my code I call it block size, it also could
be fragment size or chunk size etc. I recall you had a
discussion in IRC about similar terminology, and even though
it wasn't related to JACK, I think you have a clear opinion
about this and I'd like to consistently conform to it.

-- 
Tanu Kaskinen
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss