• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: scheduling a block from a render callback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: scheduling a block from a render callback


  • Subject: RE: scheduling a block from a render callback
  • From: Tim Dorcey <email@hidden>
  • Date: Wed, 08 Jan 2014 07:21:38 -0800

I put the data on a non-blocking FIFO queue, then send a 0 length UDP packet to a non-blocking socket I am waiting on with select().  It happens that I want to process the audio in my network I/O thread that is already waiting on the select() so this was convenient.  I missed the rule about not using anything in the BSD layer, but I don't think this has caused any problems.
Tim

> -----Original Message-----
> From: coreaudio-api-bounces+tim=email@hidden
> [mailto:coreaudio-api-bounces+tim=email@hidden] On Behalf
> Of Lucas Ives
> Sent: Tuesday, January 07, 2014 5:45 PM
> To: email@hidden
> Subject: scheduling a block from a render callback
>
> 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


  • Follow-Ups:
    • Re: scheduling a block from a render callback
      • From: Paul Davis <email@hidden>
References: 
 >scheduling a block from a render callback (From: Lucas Ives <email@hidden>)

  • Prev by Date: Re: scheduling a block from a render callback
  • Next by Date: Access AUSampler's pan & pitch parameters via UISlider
  • Previous by thread: Re: scheduling a block from a render callback
  • Next by thread: Re: scheduling a block from a render callback
  • Index(es):
    • Date
    • Thread