• 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: best practices for sending data from UI to RemoteIO callback thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: best practices for sending data from UI to RemoteIO callback thread


  • Subject: Re: best practices for sending data from UI to RemoteIO callback thread
  • From: Morgan Packard <email@hidden>
  • Date: Sat, 26 Mar 2011 15:33:30 -0600

Thanks Paul,
So, would using a circular buffer / message queue technique like the
one described by wm schauweker be the generally preferred way of
sending commands from a UI to a real-time audio thread?
-Morgan


On Sat, Mar 26, 2011 at 3:29 PM, Paul Davis <email@hidden> wrote:
> On Sat, Mar 26, 2011 at 5:25 PM, Morgan Packard
> <email@hidden> wrote:
>> So, after looking at your code, looks like the only piece data shared
>> by the producer and consumer is this hasCommand_ flag. Is it unsafe to
>> even increment and decrement a shared value (meaning a value that more
>> than one thread is writing to) without using these OSAtomicIncrement
>> functions? Perhaps that may be the reason for the mysterious failures
>> I get once in a blue moon.
>
> it is never safe unless you know that re-ordered read/writes of the
> value will cause no damage. there are cases where this is true;
> generally, its false.
>  _______________________________________________
> 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
>



--
================================
Web:
http://www.morganpackard.com
Music/Art:
Latest album: Moment Again Elsewhere
iOS app Thicket available on iTunes store.
================================
 _______________________________________________
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: best practices for sending data from UI to RemoteIO callback thread
      • From: Paul Davis <email@hidden>
References: 
 >best practices for sending data from UI to RemoteIO callback thread (From: Morgan Packard <email@hidden>)
 >Re: best practices for sending data from UI to RemoteIO callback thread (From: Morgan Packard <email@hidden>)
 >Re: best practices for sending data from UI to RemoteIO callback thread (From: wm schauweker <email@hidden>)
 >Re: best practices for sending data from UI to RemoteIO callback thread (From: Morgan Packard <email@hidden>)
 >Re: best practices for sending data from UI to RemoteIO callback thread (From: Paul Davis <email@hidden>)

  • Prev by Date: Re: best practices for sending data from UI to RemoteIO callback thread
  • Next by Date: Re: best practices for sending data from UI to RemoteIO callback thread
  • Previous by thread: Re: best practices for sending data from UI to RemoteIO callback thread
  • Next by thread: Re: best practices for sending data from UI to RemoteIO callback thread
  • Index(es):
    • Date
    • Thread