Re: Converting multichannel file to stereo with down-mix.
Re: Converting multichannel file to stereo with down-mix.
- Subject: Re: Converting multichannel file to stereo with down-mix.
- From: email@hidden
- Date: Thu, 07 Jun 2012 23:49:14 -0400
Thanks Brian, that helps a lot. While looking into this I also
discovered I can get mix coefficients from Audio Format Services'
property kAudioFormatProperty_MatrixMixMap. I'll have to play around
with this a bit and see what I come up with. Thanks again for putting
me on the right track.
Mark Verstraete
Quoting Brian Willoughby <email@hidden>:
Yes. You can do this with CoreAudio using Apple's MatrixMixer.
Since ExtAudioFile includes an AudioConverter, but AudioConverter
will not mix channels, you may need to create an AUGraph if you
don't already have one in your application. Then, in the AUGraph,
you need to link the output of the ExtAudioFile to the input of the
MatrixMixer, such that the input bus has 6 channels and the output
bus has 2 channels. You will also need to set individual mixer node
volume levels according to which channels you want in Left, and
which you want in Right, along with their relative levels. You
might also need some kind of dynamics processing, such as Apple's
PeakLimiter, to prevent the mixed channels from overloading the full
scale volume limit.
There should be examples of using the MatrixMixer, and the header
files for AudioUnits has some degree of documentation of how the
MatrixMixer node volume parameters work.
Brian Willoughby
Sound Consulting
On Jun 7, 2012, at 18:45, email@hidden wrote:
I'm trying to figure out how I can convert a multichannel
(surround) audio file to stereo using the ExtAudioFile and Audio
Converter APIs. I would like the stereo output file to be a
fold-down mix of all the channels, similar to what quicktime does.
No matter what I try, the resulting stereo file only has the first
two channels of the source file.
For example, I have a 6-channel AIF file whose channel layout is
kAudioChannelLayoutTag_MPEG_5_1_A (L R C LFE Ls Rs). I've tried
setting the ExtAudioFile's client and file channel layout... I've
tried setting the Audio Converter's input and output channel
layout. I always get only the L and R channels on the output. Is
there any possible way to do a fold-down mix using Core Audio?
_______________________________________________
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
_______________________________________________
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