Re: run loops vs. posix condition variables
Re: run loops vs. posix condition variables
- Subject: Re: run loops vs. posix condition variables
- From: William Stewart <email@hidden>
- Date: Thu, 3 Dec 2009 10:33:59 -0800
On Dec 3, 2009, at 10:14 AM, Aaron B. wrote:
Hi,
Let's say I am reading audio input from a device and I would like to
do some signal processing and display the results. If the signal
processing is very computationally intensive, I expect that it should
not be done in the AudioQueue callback (I read that if real-time
threads are too compute-bound, they can be demoted in priority).
Yes, but the AQ callback happens on a thread that you own, and it is
not normally required to use a real-time thread for that callback. You
can do as much or as little work as you like in this thread (its
really up to you) as long as you provide enough time for the queue to
notify you that it has finished processing your enqueued buffer, etc,
Bill
So I
should dump the audio data in a buffer that gets processed by another
thread. My question is: do I have to fiddle with the "run loop"
methods of this second thread? I mean, in a very simple
producer-consumer scenario such as this, is there any reason that the
run loop thread control interface is superior to simple POSIX
condition variables?
- Aaron
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden