Re: scheduling a block from a render callback
Re: scheduling a block from a render callback
- Subject: Re: scheduling a block from a render callback
- From: Lucas Ives <email@hidden>
- Date: Tue, 07 Jan 2014 18:33:29 -0800
Yup; TAAE uses a polling model.
-l
On Tue, Jan 7, 2014 at 6:08 PM, Gregory Wieber <email@hidden> wrote:
> Have you checked out TheAmazingAudioEngine? It has some facilities for thread communication and synchronization (non-locking).
>
> Sent from my iPhone
>
>> On Jan 7, 2014, at 5:44 PM, Lucas Ives <email@hidden> wrote:
>>
>> Hey all,
>>
>> In a nutshell: from my audio render callback I'd like to trigger work,
>> on demand, on another thread. What's the preferred way to do this sort
>> of thing?
>>
>> Specifically: after I've rendered a particular audio frame, I'd like to fire
>> a completion block. dispatch_async() seems like an obvious way to do
>> this, but per Apple anything in the BSD layer or anything that may take
>> a lock -- I believe GCD is a yes on both counts -- is off limits in the
>> real-time callback.
>>
>> I could pass data through a lock-free pipe back to another thread and
>> poll its existence, but my blocks have the property that they both need
>> to fire as soon as possible and also are used (relatively)
>> infrequently... so it seems like a waste to be constantly polling for
>> them using NSTimer or the like.
>>
>> Other solutions?
>>
>> Thanks in advance for any advice.
>>
>> -l
>> _______________________________________________
>> 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