• 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: Output Capture
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Output Capture


  • Subject: Re: Output Capture
  • From: Jeff Moore <email@hidden>
  • Date: Wed, 18 Jul 2007 12:50:58 -0700


On Jul 18, 2007, at 12:29 PM, email@hidden wrote:

On Jul 18, 2007, at 1:04 PM, Jeff Moore wrote:

The output buffers are there for _you_ to put data in. Until you do that, the buffers will be filled with zeroes.

The system does not provide any means for accessing the output data going to the device.

OK I found this post just after I sent my email, which puts a damper on things:


http://lists.apple.com/archives/coreaudio-api/2006/Jan/msg00101.html

Yup. What I said then still applies today.


All is not lost though. What would also work for me is, if I could pipe the output of the sound manager into an audio unit or something that mixes it, and then have 1 single output, that I could use as an input for echo cancellation, and then could pass on to the output device. I found this:


http://developer.apple.com/qa/qa2005/qa1394.html

I think you are misreading this tech note.

Which kinda sorta suggests that there is a way to find things like NSSound or the Carbon Sound Manager as an input. This may not be doable though, for the same reason we can't capture the mac's whole output.

It suggests nothing of the sort. Rather, it is documenting the interaction between two bugs in 10.3.x. First, NSSound was improperly NULL'ing out the pointers to the input buffers in it's IOProc. The second bug is that the HAL was not refreshing these pointers prior to calling each IOProc.


The trouble is that I have 2 carbon sound callbacks in my app, one for voice, and one for our game sound fx, and I can't mix those easily (for one thing their sample rates and number of channels are different, and for another, the code is leftover from OS 9 days and pretty complicated to dive into). But I COULD pipe these into core audio in a thread safe way from the 2 callbacks, and get 1 output. I just have no idea how to do this. I've read over the core audio manual pdf, it's just a lot to take in. So while the concepts are fairly simple, I don't feel ready to just start typing code, and was hoping for an example.

The right thing to do is to update this code to stop using the Sound Manager and to take more control over things by using the various Core Audio APIs.


P.S. I think that since capturing output is disabled for DRM,

It is not disabled solely because of DRM issues. It is more correct to say that it is not directly supported because the OS X audio architecture does make it easy to support. Because the bang for the buck on such a feature is so small, it is unlikely to be supported in the future.


then a built-in echo cancelled sound input is a requirement. This would be extremely easy for apple to do, since they are already doing it in iChat I believe. Also, this needs to be included in a system update retroactively for 10.3.9, or as a small lib we can include in our app's package, so that we can use it in games.

The fact that iChat does it's echo cancellation entirely on its own without needing any of what you are talking about proves that it most certainly is not a requirement. There's nothing stopping you from doing the same thing iChat does other than how willing you are to take on the task of understanding and implementing echo cancellation. The system is certainly not getting in your way.


--

Jeff Moore
Core Audio
Apple


_______________________________________________ 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: Output Capture
      • From: Andy O'Meara <email@hidden>
    • Re: Output Capture
      • From: email@hidden
    • Re: Output Capture
      • From: Richard Burnett <email@hidden>
References: 
 >Output Capture (From: email@hidden)
 >Re: Output Capture (From: Jeff Moore <email@hidden>)
 >Re: Output Capture (From: email@hidden)

  • Prev by Date: Re: Output Capture
  • Next by Date: Re: Output Capture
  • Previous by thread: Re: Output Capture
  • Next by thread: Re: Output Capture
  • Index(es):
    • Date
    • Thread