Re: where to start with converting an mp3 file to pcm
Re: where to start with converting an mp3 file to pcm
- Subject: Re: where to start with converting an mp3 file to pcm
- From: Chris Adamson <email@hidden>
- Date: Mon, 19 Sep 2011 18:21:04 -0400
Agreed with Steven that the premise seems dubious in the first place.
That said, directly using the Audio Conversion functions would be more direct than an Audio Queue, although it's not as easy to find good docs or sample code. We do have an example in the book. You'd then have to write the PCM sample buffers to a file with Audio File Services.
The cleanest way to do it would be with an ExtAudioFile, which would give you MP3-to-PCM conversion and file I/O to the container of your choice(*) in one fell swoop.
(*) - if your app is the only thing that's ever going to read the converted files, I'd argue that .caf would be superior to .aiff or .wav.
--Chris
On Sep 19, 2011, at 5:06 PM, Steven Winston wrote:
> Erm... why do you want to expand the file to PCM on the user's hard
> drive? Why not keep it as mp3? You get the same quality as the fact
> that it was mp3 at some point means there's already a degradation of
> signal all you could possibly get is less time decoding it in
> software; but nearly every device I can think of has hardware mp3
> decoders; so that doesn't make sense either.
> In any case; it's actually quite trivial to do. You can use offline
> render from audio queue services. Documentation for that is online.
>
> On Mon, Sep 19, 2011 at 1:59 PM, Morgan Packard
> <email@hidden> wrote:
>> Hello list,
>> I'd like to ship my app with mp3s and expand them to pcm files (aif or wav)
>> on the user's hard drive. I'd be grateful if anyone could point me toward
>> the most appropriate technologies for the job. Even better would be to point
>> me toward some sample code.
>> thanks!
>> -Morgan
>> _______________________________________________
>> 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
_______________________________________________
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