• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SPDIF encoded output on G5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SPDIF encoded output on G5


  • Subject: Re: SPDIF encoded output on G5
  • From: Derk-Jan Hartman <email@hidden>
  • Date: Thu, 1 Dec 2005 01:09:27 +0100

Incorrect. You need to byte-swap as dictated by the flags.

Natively, an AC-3 bitstream has the same endian properties as MPEG data streams. That is, it's big endian. When you take the native stream and hack it up to be put on a SPDIF cable (which is what kAudioFormat60958AC3 signifies), you are basically making the AC-3 packet behave like 16 bit, stereo, signed integer data (which is why the standard format flags apply to the ASBD).

So, if the ASBD sets kAudioFormatFlagIsBigEndian, you don't need to byte-swap. If kAudioFormatFlagIsBigEndian is clear, you have to byte-swap the data as if it was 16 bit samples.

mm, ok.
This is extraordinary in my eyes. I have not seen a device so far that has big endian set for SPDIF output in HAL or Alsa.
In this case does the SPDIF header have to be byteswapped as well ?

Answer to self, YES you do.

I made some changes to the VLC framer to output big endian, and now it works !!!!!
wohooo. the question now is how i nicely integrate this into the VLC architecture. Alsa is always LE as far as i know, but from DirectX i'm no so sure. Depending on the commonness of this i will either byteswap back in IOProc or introduced spdif_LE and spdif_BE. but that's for tomorrow.


Finally after all this time, VLC will be able to support digital audio and discrete multichannel audio in one application. :D It took a while, but we are finally there :D

DJ
_______________________________________________
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


  • Follow-Ups:
    • Re: SPDIF encoded output on G5
      • From: Jeff Moore <email@hidden>
References: 
 >SPDIF encoded output on G5 (From: Derk-Jan Hartman <email@hidden>)
 >Re: SPDIF encoded output on G5 (From: Jeff Moore <email@hidden>)
 >Re: SPDIF encoded output on G5 (From: Derk-Jan Hartman <email@hidden>)

  • Prev by Date: Re: SPDIF encoded output on G5
  • Next by Date: Re: SPDIF encoded output on G5
  • Previous by thread: Re: SPDIF encoded output on G5
  • Next by thread: Re: SPDIF encoded output on G5
  • Index(es):
    • Date
    • Thread