• 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
Any system calls OK to use in audio thread?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Any system calls OK to use in audio thread?


  • Subject: Any system calls OK to use in audio thread?
  • From: Matt Ingalls <email@hidden>
  • Date: Mon, 26 Feb 2018 16:06:00 -0800

I have to admit that in the past i’ve done some dubious things inside the audio
thread -- and i’m not proud of it.. ;)

But in some recent C++ work, I'm not letting myself call any function I’m not
absolutely sure is lock-free.

Ross Bencina’s article is still my go-to-reference:
http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing

<http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing>

But now I’m wondering if I’m being too anal...

Could I at least call memcpy and memset?
And although I haven’t used any STL classes, maybe std::array might be safe to
use?

I am however calling some vDSP functions. I assumed they were intended to be
used in real-time threads,
but I actually can’t find anything that confirms this in the documentation - it
does say it uses GCD,
and I seem to recall a WWDC video
https://developer.apple.com/videos/play/wwdc2015/508/?time=2952
<https://developer.apple.com/videos/play/wwdc2015/508/?time=2976>
where Doug Wyatt says you shouldn’t even be calling dispatch_async() in the
audio thread,  so I don’t know..??

Any thoughts would be appreciated.

Thanks,
Matt


 _______________________________________________
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: Any system calls OK to use in audio thread?
      • From: Jean-Daniel <email@hidden>
    • Re: Any system calls OK to use in audio thread?
      • From: Brian Willoughby <email@hidden>
  • Prev by Date: Re: Channel Specific MIDI Reverb with an AUGraph
  • Next by Date: Re: Any system calls OK to use in audio thread?
  • Previous by thread: iOS: Bluetooth Speaker, Internal Microphone & AVAudioSession Recording
  • Next by thread: Re: Any system calls OK to use in audio thread?
  • Index(es):
    • Date
    • Thread