Hello Guest

[Dev] How do I know from the main thread that IAA is connected to a host?

  • 2 Replies
  • 681 Views
Hey!
I'm developing an IAA node. I need to know when the app is connected to a host to show the transport view.
What's the best way to know this from the main thread? Is there a callback or the only way is to read it in the audio thread and then notify the view?

Thanks!

Re: [Dev] How do I know from the main thread that IAA is connected to a host?
« Reply #1 on: November 04, 2017, 04:52:16 PM »
Hi,

Sure, add a property listener on kAudioUnitProperty_IsInterAppConnected for your hosted remoteIO unit. In the callback, read the property to see if you're connected or not. The property listener will be called on some non-main-thread, but just dispatch_async() to main queue to update stuff on the main thread. (UI, sending NSNotification, etc..)

Re: [Dev] How do I know from the main thread that IAA is connected to a host?
« Reply #2 on: November 05, 2017, 04:33:50 AM »
Ok.
Thanks!