Re: Hardware accelerated audio decoding?
Re: Hardware accelerated audio decoding?
- Subject: Re: Hardware accelerated audio decoding?
- From: Jeff Moore <email@hidden>
- Date: Mon, 16 Dec 2002 11:18:25 -0800
On Monday, December 16, 2002, at 07:06 AM, Dan Christainsen wrote:
Hi,
I was trying to figure out how to write a native mac output for a
media player, when I noticed flags in <CoreAudio/CoreAudioTypes.h> for
input formats other than uncompressed audio, namely kAudioFormatMPEG,
kAudioFormatMPEG4AAC and kAudioFormatAC3 among others. I couldn't find
any documentation on this, and I couldn't figure out whether these
flags would work for the default output unit.
Whether or not a given audio device supports a non-linear PCM format is
found via the HAL. Also, the HAL output AudioUnits do not support doing
IO in non-linear PCM formats, so you'll need to drop down and use the
HAL anyway.
Does it really support hardware decoding of AC-3?
Certain audio devices do support AC-3.
Or internal decoding of formats like MP3 and AAC?
The HAL and the IOAudio family currently don't support variable bit
rate formats like MP3 or AAC. Usually, you'll be talking about the
constant bit rate version of the format that can be transmitted over a
digital interface, like SPDIF or AES/EBU for transport to a hardware
decoder somewhere else (like the head unit of your stereo).
I was able to find some pages on the Apple site that stated that my
iMac DV had "Stereo with enhanced AC-3 and surround sound", but I
could find nothing else on this topic. It is such an impressive
feature that I somehow find it hard to believe that it actually
works... But in case it really works, should one do something
particular to the audio stream prior to sending it to the unit?
It most certainly does work. I demo'd it at WWDC last year.
Like I said, you can't use the AudioUnit to do the IO. You have to use
the HAL. There is a bit of sample code in our recent SDK that shows
this feature off (provided you have the hardware). It's installed at
/Developer/Examples/CoreAudio/HAL/HALPlayFile. The code is kind of ugly
but it gets the point across.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.