Re: Outputting multichannel sound through the optical link??
Re: Outputting multichannel sound through the optical link??
- Subject: Re: Outputting multichannel sound through the optical link??
- From: Jeff Moore <email@hidden>
- Date: Fri, 05 Feb 2010 08:39:04 -0800
First off, you do realize that the standard that defines SPDIF only supports two channels of data, right? So, there is no way to put more than two uncompressed channels of data on that link. So, you have to use some kind of encoded format. You listed off several kinds of encodings that your receiver supports. Most of those formats can be massaged to fit onto the SPDIF link. The formats that have more than 6 channels in them are generally newer than the spec so I can't state for certain that they will work on the link. Typically, those higher bandwidth codecs are only available via the HDMI link.
At any rate, once you get your data into a form that can be put on the link (which is entirely up to you BTW, we do not ship encoders for any of these formats), you can use the audio HAL to send the data provided that the hardware in question supports it. The general procedure would go something like this:
1) Find the device that supports the encoded format of your choice
2) Take hog mode on that device to prevent other apps from using the device. This is important because you can't do any mixing with an encoded format. So, having another app try to use the device at the same time will cause problems.
3) Set the stream format to the encoded format. This will have the side effect of forcing the HAL's IO buffer size to be equal to the size of a single packet of data.
4) When your IOProc is called, just supply the data in the output buffers one packet at a time.
Our DVD Player makes use of this feature, for example, to play the AC-3 sound tracks on DVDs.
On Feb 5, 2010, at 7:57 AM, Simon Thorpe wrote:
> Hi,
>
> This is a question that I've been struggling with for a long time.
>
> Multichannel sound files have been standard on Macs for a long time. I can easily generate 5 or 7 channel AIFF recordings with Logic Studio for example.
>
> Currently, I can play them using an expensive firewire interface Roland FA-101 and routing the analog audio signals to the analog audio inputs on my 7.1 channel Onkyo amplifier.
>
> OK, it works. But it's pretty stupid. Why convert digital to analog and back to digital when all Macs have a nice optical digitial connector which will happily send multichannel movie soundtracks to the amplifier?
>
> From my understanding, in order to play a multichannel audio file, I would have to use software like Compressor to generate a Dolby Digiial or DTS or AC3 formatted file. This seems excessively complex.
>
> Is this really necessary? Is there no way just to send the multichannel audio directly out through the optical link? Are there no home theatre amplifiers that could understand a non-proprietry dumb multichannel stream?
>
> My ONKYO amplifier seems to have the ability to recognize loads of different formats - Dolby Prologic II, Dolby True HD, DTS HD, DTS NEOS, DTS ES etc etc.... Can a Mac generate anything through the optical link that can be understood by such an amplifier?
>
> If (as I suspect), the only answer is to generate a propriety format that is not part of the Core-Audio specification, can I ask why? What would be so terrible if Macs could talk directly to multichannel amplifiers? Is someone out there deliberately making life difficult??
>
> I found a web article in 2007 that describe the situation then, http://www.buildamediaserver.com/How-Tos/0BE6E2C4-1B6D-4689-825C-4E60BD5A02BC.html
>
> Has nothing changed?
>
> Hoping that someone knows the answers....
>
> Simon
> _______________________________________________
> 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
--
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