Re: [Jack-Devel] buffer size callback, revisit

PrevNext  Index
DateTue, 15 Feb 2011 22:31:29 -0600
From Jack O'Quin <[hidden] at gmail dot com>
Tohermann <[hidden] at web dot de>
CcJACK <[hidden] at lists dot jackaudio dot org>
In-Reply-Tohermann Re: [Jack-Devel] buffer size callback, revisit
Follow-Uphermann Re: [Jack-Devel] buffer size callback, revisit
On Tue, Feb 15, 2011 at 10:22 PM, hermann <[hidden]> wrote:

> Many jack clients cant handle buffersize changes anyway, mostly because
> the jack_set_buffer_size_callback() isn't involved.

This is true, and worth keeping in mind.

> But anyhow, clients witch handle it, and use internal buffers, have
> allocate the buffers before they called jack_activate(), so, a change in
> buffersize in between this time, leads anyway to a new allocation, when
> the client notice the change, isn't it ?

Paul and Torben are concerned about what happens after allocation and
before calling jack_activate().

> so wouldn't a call like
>
> if (!jack_activate(jack_client))
>  if(sz != jack_get_buffer_size (jack_client)){buffersize change handle }
>
> handle the race condition without change anything in jack ?

No, I don't think so. The process thread could even run while the main
thread is still returning from jack_activate().
-- 
 joq
PrevNext  Index

1297830719.9890_0.ltw:2,a <AANLkTikR7NinU=D80+hEt3b+Yd5_2RZB4s2xQNW0v+k5 at mail dot gmail dot com>