Re: how to convert to PCM on iPhone OS 2.2? has anyone got this working? (AudioConverter, ExtAudioFile, AudioQueueRenderOffline ???)
Re: how to convert to PCM on iPhone OS 2.2? has anyone got this working? (AudioConverter, ExtAudioFile, AudioQueueRenderOffline ???)
- Subject: Re: how to convert to PCM on iPhone OS 2.2? has anyone got this working? (AudioConverter, ExtAudioFile, AudioQueueRenderOffline ???)
- From: Doug Wyatt <email@hidden>
- Date: Wed, 7 Jan 2009 10:26:47 -0800
On iPhone AudioConverter and ExtAudioFile don't support mp3/m4a/Apple
Lossless.
AudioQueueRenderOffline can be made to work, but it's "touchy". The
recipe is roughly:
- AudioQueueStart
- AudioQueueOfflineRender for 0 frames
- AudioQueueEnqueueBuffer for one or more buffers with relatively
large numbers of frames, e.g. 16K+
- AudioQueueOfflineRender with a relatively small number of nframes,
e.g. 4096
In particular, you must take care not to pull (call OfflineRender)
for more frames than you have pushed (via EnqueueBuffer).
- know how many frames you expect to decode so that you know when to
stop calling OfflineRender
On Jan 7, 2009, at 9:54 , Andrew E. Davidson wrote:
Hi
My iPhone app allows users to upload audio files. I do some simple
filtering on the files then play them using AudioQueues. I need the
samples to be in 16 bit integer PCM format. I do not understand how
to do the conversion. This topic has come up several times over the
last couple of months. It is not clear to me if anyone has gotten
this to work
I personally wasted a lot of time with AudioConverters. I could
never get this to work. I was trying to convert an mp3.
I have seen a couple of posting that talk about using ExtAudioFile
based on the convert file demo.
Several posting suggest using AudioQueueRenderOffline
I get the impression that different approaches maybe needed for
different formats. Can some one provide a summary of the approach
required for different audio file types. I assume give this is an
iPhone app, that the source of most of the audio files will be
iTunes, so I guess the most common formats I am likely to see are
mp3, m4a, and m4p
_______________________________________________
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