Arve Knudsen <[EMAIL PROTECTED]> writes:
> The thing is I don't have complete control over the audio thread, a
> user defined callback is involved. In working on the ALSA
> implementation of the PortAudio library there has been a request for
> realtime scheduling of the audio thread, similar to the older OSS
> implementation. The OSS implementation starts both a watchdog and a
> canary thread; the watchdog will kill the audio thread (with SIGKILL)
> if it doesn't respond within 3-second intervals, or lower it's
> priority if the (normal priority) canary thread is starved.
You can do something like this...
int oldtype;
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
/* invoke the callback */
framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor,
&callbackResult );
/* restore original canceltype setting */
pthread_setcanceltype(oldtype, NULL);
--
joq