Re: converting samples from mp3 stream to pcm in memory (iOS)
Re: converting samples from mp3 stream to pcm in memory (iOS)
- Subject: Re: converting samples from mp3 stream to pcm in memory (iOS)
- From: Chris Adamson <email@hidden>
- Date: Thu, 04 Oct 2012 06:54:10 -0400
Instead of sending the data you receive from the audio file stream callback directly to the audio queue, you could convert it to PCM, run your analysis, and then feed it to the audio queue (as PCM) if you still need to play it. To do the conversion, you could use Audio Converter Services (which will be a screaming nightmare without end), or an offline audio queue.
Option 3: look into the new Audio Queue "tap" on iOS 6, which lets you look at data inside a queue. I still need to check this out… it looks cool (and I'm giving a talk on it three weeks at CocoaConf, so, yeah…)
-Chris
Sent from my iPad
On Oct 4, 2012, at 6:33 AM, Benjamin | Freunde der Interaktion <email@hidden> wrote:
> Hey guys,
>
> I'd like to do some realtime analysis on audio data from a mp3 stream while it's playing (on iOS).
> I need to convert samples to PCM format, not a whole file. And I need the result in some kind of
> in-memory-buffer for further calculations.
>
> In the moment I'm using Matt Galagher's AudioStreamer and have access to the mp3 samples
> (or aac). He's using the Audio Toolbox Framework (Audio Queue Services, Audio File Stream Services,…).
>
> I am aware that this will probably cause performance problems, but it's a research subject and
> I really need a starting point for this.
>
> Thanks for any hint!
>
> Best,
> Benjamin
> _______________________________________________
> 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