• 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: RemoteIO unit at beginning and end of an AUGraph
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RemoteIO unit at beginning and end of an AUGraph


  • Subject: Re: RemoteIO unit at beginning and end of an AUGraph
  • From: William Stewart <email@hidden>
  • Date: Fri, 10 Apr 2009 15:43:36 -0700


On Apr 10, 2009, at 1:48 PM, Chris Adamson wrote:

OK, I've given up on thinking I can just connect the RemoteIOUnit's bus 1 output to an input of my MultiChannelMixer like this:

setupErr = AUGraphConnectNodeInput(auGraph, remoteIONode, 1, mixerNode, 0);

Instead, I've set up an input render callback on the RemoteIOUnit, similar to the CAPlayThrough example and Technical Note TN2091 <http://developer.apple.com/technotes/tn2002/tn2091.html>.  Eventually, I'll copy samples received in this callback to a render callback on the mixer's input bus 0.

So, of course, that's proving difficult too.  Here's where I set the callback:

<http://pastie.org/443208>

FWIW, AudioInputState is a struct that I'm using to hold a pointer to the RemoteIOUnit and the received AudioBufferList*.

Problem now is in the callback method.  It's almost identical to TN2091, except that it gets the RemoteIOUnit from my struct:

<http://pastie.org/443211>

Basically, what the debugger tells me is that every time I get the callback, inNumberFrames is passed in as 0.  I assume that's the reason that the call to AudioUnitRender always returns -50, paramErr.

That generally means that you don't have any input.

What you should do is:

Make sure your audio category is play and record
make the session active
initialise the remote io

check the sample rates on the device side of the AU (input el 1, output el 0) - this gives you the sample rate of the device. This should be the same sample rate as reported by the audio session, current hardware sample rate


For the direct connection:
If your client formats on the remote io (output el 1, input el 0) match these sample rates, then we believe (and will try to verify in the next few days) that the connection described above would work 


By comparison, CAPlayThrough seems to always get called back with 800 frames to render.

right - that's why I think you might be missing some session set up - you don't have this complexity on the desktop


So, is there anything obviously stupid about how I've set up this callback?

Also, I don't see callbacks at all when running on the Simulator.  Can I assume audio input only works on the device?

I think that's more evidence that the category isn't set properly. aurioTouch works in the Sim as well I believe

Bill

 _______________________________________________
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: RemoteIO unit at beginning and end of an AUGraph
      • From: Chris Adamson <email@hidden>
References: 
 >RemoteIO unit at beginning and end of an AUGraph (From: Chris Adamson <email@hidden>)
 >Re: RemoteIO unit at beginning and end of an AUGraph (From: Chris Adamson <email@hidden>)
 >Re: RemoteIO unit at beginning and end of an AUGraph (From: William Stewart <email@hidden>)
 >Re: RemoteIO unit at beginning and end of an AUGraph (From: Chris Adamson <email@hidden>)

  • Prev by Date: Rez: syserror 0 when building Audio Unit template
  • Next by Date: Re: Capturing AU output to file
  • Previous by thread: Re: RemoteIO unit at beginning and end of an AUGraph
  • Next by thread: Re: RemoteIO unit at beginning and end of an AUGraph
  • Index(es):
    • Date
    • Thread