Re: Jack/USB cycle of USB output Sound device.

Fons Adriaensen <[email protected]> Sat, 30 Mar 2019 13:25:27 +0100
Newsgroups gmane.comp.audio.jackit
Message-ID <[email protected]>
On Sat, Mar 30, 2019 at 11:26:24AM +0100, Thomas Brand wrote:

> I think it's not that simple. If jack looses its backend, there's nothing
> to connect to, no clock etc. Even if jack can take care of the time where
> no backend is available, if a new backend is attached, it might have a
> different SR or different buffersize.

Actually I think something could be done without too much complexity.

* When Jack detects that a backend goes away, it switches to a 'dummy'
  one with the same sample rate, buffer size, and number of channels.
  Basically this is the same as freewheeling, except that waiting for
  a timer would be inserted in between cycles.

* When the backend is available again, there is a single API call
  that re-initiliases it with the existing parameters. Once this is
  done, Jack switches back.

Apart from signalling the events (again similar to freewheeling) this
could be transparent to clients.


-- 
FA