Re: [Jack-Devel] Stopping jack from callback
On Thu, Aug 15, 2013 at 1:27 PM, Anders Tornvig <[hidden]>
wrote:
> I'm counting how many times I have been in the process_callback and I
would like to stop immediately after the, say, 100th visit.
Use jack_deactivate( client ); in the process() callback, when your
condition is met.
Note that you are violating threading rules by writing to a variable in the
JACK callback, while reading the variable in main().
You must use a ringbuffer / other thread-safe structure for exchanging data
between threads.
HTH, -Harry
1376570094.14660_0.ltw:2,a <CAKudYbOh6KN57+G3qL_6LWqNQwybDbYyeuSc_CK+aMJfKS5wSw at mail dot gmail dot com>