Re: Decoding raw AMR
Re: Decoding raw AMR
- Subject: Re: Decoding raw AMR
- From: William Stewart <email@hidden>
- Date: Mon, 29 Jan 2007 12:12:36 -0800
On 27/01/2007, at 7:07 AM, Martin Storsjö wrote:
On Fri, 26 Jan 2007, William Stewart wrote:
Use the AudioConverter API - if you look at:
Yes, I've tried using that too, as I said, but no matter what I do,
I get kAudioCodecStateError when calling
AudioConverterFillComplexBuffer.
/Developer/Examples/CoreAudio/SimpleSDK/ConvertFile
this should give you enough to get started.
I actually used this as example on using the AudioConverter API,
but ConvertFile neither seems to be able to decode nor encode AMR
files.
AMR files aren't supported in Tiger. But AMR data can be read and
written to a CAF file, so the actual interface to a converter for
encoding/decoding AMR data is working I think.
There are two pieces here remember:
AMR files - this is a file type of just AMR data - not supported in
Tiger
AMR data - this is a codec type and AMR is a defined data format for
voice in 3GPP
(And just to be clear, CAF files can store any audio data format, so
we use them extensively both as a test bed as well as a simple but
flexible file format to contain any audio format we know about)
Is there any example code which actually can decode amr files?
So, if you took ConvertFile as your starting point, you would need to
read / write the AMR packets from an AMR file yourself, but could use
the interface to the converter for decoding/encoding.
There is some funkiness about the way AMR is packaged into 3G and the
way the cookie is constructed.. you should probably look at the 3G
spec for details on this.
We are hoping to support AMR files directly in Leopard (but that
doesn't help you on Tiger)
Test files for what I'm trying to decode are available at http://
albin.abo.fi/~mstorsjo/amr/. The amr-<n>.dat are individual
packets, which should be decoded into 160 16-bit samples. By
prepending the header-file and concatenating the .dat-files,
test.amr is created, which plays fine in QuickTime Player. But I
can't decode any of them, neither the raw packets nor the real amr
file including a header, using the AudioConverter API.
Oh, that's a good point - there is the AudioExtraction APIs in QT -
you could use that to pull out the audio samples from an AMR file
Bill
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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