• 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: Endian stuff was: Re: SPDIF encoded output on G5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Endian stuff was: Re: SPDIF encoded output on G5


  • Subject: Re: Endian stuff was: Re: SPDIF encoded output on G5
  • From: Jeff Moore <email@hidden>
  • Date: Wed, 30 Nov 2005 17:31:57 -0800

If you are doing whole buffers of numbers, then you can just use the AudioConverter. It has optimized blitters (for both PPC and Intel) for pretty much everything you're likely to run into. If that's too much baggage, the AudioReflectorDriver sample code has optimized blit loops for use in the kernel by audio drivers. They can easily be adapted to use anywhere (in fact, that very code is what we use in the AudioConverter).

If you are just doing them one at a time, you can use the routines in <CoreFoundation/CFEndian.h>.

On Nov 30, 2005, at 5:11 PM, Urs Heckmann wrote:

Jeff Moore:

In fact, you might run into the exact same hardware you're doing it for now =)

Btw... sorry for hijacking... does anybody have a super quick way for byte swapping an arbitrary number of longs/floats? Something like industrial strength dsp code?


How would you implement this function on PPC and/or/vs. Intel:

inline void swapEndian( UInt32 &ICameFromOuterSpace )
{
	// ?
}

I think I saw a fancy trick years ago using shifts and exclusive or. But I can't remember.

I guess the slowest must be using arrays of chars... as these might occupy a lot of registers... or not so?

Cheers,

;)  Urs


urs heckmann email@hidden www.u-he.com



--

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
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>)
 >Re: SPDIF encoded output on G5 (From: Derk-Jan Hartman <email@hidden>)
 >Re: SPDIF encoded output on G5 (From: Jeff Moore <email@hidden>)
 >Endian stuff was: Re: SPDIF encoded output on G5 (From: Urs Heckmann <email@hidden>)

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