Re: Output Capture
Re: Output Capture
- Subject: Re: Output Capture
- From: David Duncan <email@hidden>
- Date: Wed, 18 Jul 2007 12:45:34 -0700
On Jul 18, 2007, at 12:29 PM, email@hidden wrote:
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.
Rearrange your code. Cut out the sound manager and setup a graph to
mix the two inputs together. You can use converter units to convert
from the different sample rates. Pipe the output to a mixer unit and
you can get the final mixed output from your audio system to do what
you want with it. Core Audio is quite adept at handling the details
that your dealing with if you tell it what you want it to do.
Yes, I realize that your old code is "pretty complicated" as you say,
but this is what your going to have to do if you want to capture the
output of your application for 10.3.9+.
--
David Duncan
Apple DTS Quartz and Printing
email@hidden
_______________________________________________
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