• 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: iOS - Decode an AAC(ADTS) network stream to PCM buffers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS - Decode an AAC(ADTS) network stream to PCM buffers


  • Subject: Re: iOS - Decode an AAC(ADTS) network stream to PCM buffers
  • From: Chris Adamson <email@hidden>
  • Date: Wed, 05 Jun 2013 09:55:57 -0400

This sounds like the exact use-case for the AudioQueueProcessingTap, introduced in iOS 6.0 and Mac OS X 10.8. It lets you send compressed packets to the audio queue as usual, and get callbacks with converted PCM immediately prior to their being played.

I did some demos at CocoaConf this year that show how to tap this audio (using web radio as a source), run it through an offline AUGraph with some effect, and put the resulting audio back in the queue. First version used AUNewTimePitch, but that's kind of outside the rules, so a revised version uses AUReverb2 (I also wrote a new AUNewTimePitch version that's fed by a ring buffer, so it passes the Bill Stewart Sniff Test)

Links:

* First blog entry (concepts, first [bad] version of the code): http://www.subfurther.com/blog/2012/10/30/cocoaconf-portland-12-and-the-audioqueueprocessingtap/

* Second blog entry (ring buffer fix for AUNewTimePitch demo, simplified AUReverb2 demo): http://www.subfurther.com/blog/2013/02/23/correcting-core-audio/

Also, it looks like AudioQueueProcessingTapRef is documented only in the AudioQueue.h headers, as a search of the DocSet only brings up its mentions in the platform diff documents. Enjoy!

--Chris

On Jun 4, 2013, at 11:36 PM, Alfred Tascon <email@hidden> wrote:

> From what I have read I can only decode AAC(ADTS) streams using Audio queues and AudioFileStream services.
> Is this correct?
> Can I use an Audio Unit instead?
>
> I want to use the hardware decoder and I want to produce PCM in order to further process the audio. The network stream is not HTTP.
> I can strip the ADTS headers and present the AAC LC data.
>
>
>
> _______________________________________________
> 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


 _______________________________________________
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: 
 >iOS - Decode an AAC(ADTS) network stream to PCM buffers (From: Alfred Tascon <email@hidden>)

  • Prev by Date: Think I've found an AudioConverter bug: Sanity-check please?
  • Next by Date: Translating a signal chain to CA architecture
  • Previous by thread: iOS - Decode an AAC(ADTS) network stream to PCM buffers
  • Next by thread: Think I've found an AudioConverter bug: Sanity-check please?
  • Index(es):
    • Date
    • Thread