Re: [Jack-Devel] Stopping jack from callback
On Thu, Aug 15, 2013 at 02:27:27PM +0200, Anders Tornvig wrote:
> int process (jack_nframes_t nframes, void *arg) {
> DPOAE *dpoae = (DPOAE *)arg;
> dpoae->m++;
> }
Just return 1 in the process cycle if your variable reaches the
threshold, and jackd will deactivate you.
So it's:
int process (jack_nframes_t nframes, void *arg) {
DPOAE *dpoae = (DPOAE *)arg;
return (dpoae->m++ > 100) ? 1 : 0;
}
or something less hacky. You'd probably set your global stop variable,
too, just to inform main() about it. ;)
Cheers.
--
mail: [hidden] http://adi.thur.de PGP/GPG: key via keyserver
1376571212.15466_0.ltw:2,a <20130815125324.GM5601 at ltw dot loris dot tv>