Re: Moving data from audio thread and the other way...
Re: Moving data from audio thread and the other way...
- Subject: Re: Moving data from audio thread and the other way...
- From: Jean-Daniel Dupas <email@hidden>
- Date: Tue, 01 Nov 2011 16:03:25 +0100
Le 1 nov. 2011 à 13:32, Albin Stigö a écrit :
> Hi,
>
> I know this has been discussed before at great length but looking
> through the archives I can't seem to find a comprehensive answer (or
> documentation). I've been googling and reading blogs... But I would
> like to review the options.
>
> I far as I know these are my options signaling from the render
> callback to, let's say, a thread that then triggers updates on the
> gui.
>
> 1. pthread_cond_signal()
> I understand this involves a mutex? Can't that block?
>
> 2. mach_msg()
> Is this ok on iphone/app store?
>
> 3. Non-blocking single producer/consumer fifo.
> Is this only possible using OSAtomic?
FWIW, a single read, single writer ring buffer (FIFO) doesn't require atomic at all. It may require a barrier to guarantee memory ordering though.
-- Jean-Daniel
_______________________________________________
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