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: Ryan Walklin <email@hidden>
- Date: Sat, 6 Feb 2010 10:01:25 +1300
On 6/02/2010, at 4:57 AM, Simon Thorpe wrote:
>
> 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?
>
>
As has been said, this is impossible given the SPDIF bandwidth, as it's only able to support 2 channels at a time.
I've worked round the issue in Plex (www.plexapp.com) by using the free AC3 encoder Aften (aften.sourceforge,net) to encode multichannel PCM (e.g. from AAC/FLAC) to AC3 on the fly, and then output it to SPDIF as Jeff describes, You also need to encapsulate it as per IEC 60958 with a SPDIF header. This allows playback of video with 5.1 AAC etc.
Something like Quicktime is a little harder, as it uses the system sound output by default and won't allow access to the raw audio data when playing back (Using QTKit anyway). So I used the AudioReflectorDriver to create a 6 channel virtual device that redirects sound to a daemon which does the encoding, then plays it over the actual SPDIF device. This allows realtime 5.1 output of any audio playing on the system, and even allows mixing. There's a little latency involved in converting the audio, given the PCM stream has to round trip through kernel space, but minimising the I/O buffers drives it down to ~40ms, which I can't detect watching video.
The source for Plex is freely available at github.com, and has a GPL licence. I haven't released the code for my system-wide AC3 driver, but it shouldn't be too bad as most of the components are open source.
One problem with this solution is that Dolby Digital (DD) is patented and I'm unsure of the legality of Aften in the US. I'm in NZ so it's not a problem.
Regards,
Ryan
_______________________________________________
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