Hi Ernie,
At this time, I believe it would require writing your own AU host application. The AudioUnit specification is flexible enough to allow you to create a down-mixing AU, but it appears that no existing AU host is prepared to handle such routing. Thankfully, writing your own AU host is not that difficult because of AUGraph. In cases like this, where I need surround or other multi-channel effects patches that aren't supported by the existing hosts, I just create an AUGraph application. Unfortunately, that means I have to provide all of the GUI and other support features, but at least it's possible.
In your specific example, you would create an AUGraph that feeds either 5.1 or 7.1 audio into your AU, and then takes 2.0 stereo out. You can then feed that stereo signal to mixers, effects, output devices, or even save it to a file.
The other questions I asked had to do with situations which might cause trouble. As Bill mentioned, if you're truly creating an encoder, then the output cannot be listened to any more, so the encoder must be a codec instead of an AU. One of the reasons for this is that you cannot mix audio that is encoded, only audio that remains linear PCM. However, CoreAudio does support such encoded streams, and you can even pass them on to external devices with digital audio ports - you merely need to tell CoreAudio that the stream is unmixable, and then you must take exclusive ownership of that device.
Brian Willoughby Sound Consulting
On Feb 6, 2009, at 12:20, Ernest Burghardt wrote: 2009/2/6 Brian Willoughby <email@hidden>: > By 'encode' do you mean that some kind of 'decoder' (standard or > proprietary) can later extract the surround channels again? Is the stereo > signal listenable on a 2-channel system? Can it be mixed further like any > other stereo signal? Or does it become an encoded bit stream that sounds > like white noise? I get the impression that what you're doing is > down-mixing and not encoding, at least not by any standard definition of > encoding.
Hi Brian,
In general, what does it take to have an AU that takes multi-channel (5.1, 7.1) input and outputs stereo? Ignoring the effect technology in between the the inputs and outputs... |