• 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: Decoding raw AMR
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Decoding raw AMR


  • Subject: Re: Decoding raw AMR
  • From: Martin Storsjö <email@hidden>
  • Date: Mon, 29 Jan 2007 22:36:44 +0200 (EET)

On Mon, 29 Jan 2007, William Stewart wrote:

On 27/01/2007, at 7:07 AM, Martin Storsjö wrote:

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.

Yes, at least I've been able to open codec/converter components for the 'samr' format, so some kind of functionality is there, obviously.


I don't need support for the actual AMR files, just support for decoding individual packets.

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.

I guess I should have written "example code which actually can decode amr packets", since that's more precisely what I want. Any example code utilizing the built-in 'samr'-codec?


As mentioned, I've already got the data in packets, the problem is using the AudioConverter API (or AudioCodec directly) to decode them. But I haven't been able to avoid getting the kAudioCodecStateError when trying to decode them. Is there any extra properties specific to this codec which need to be set?

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

Thanks, I'll take a look at that!

// Martin
 _______________________________________________
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

  • Follow-Ups:
    • Re: Decoding raw AMR
      • From: James McCartney <email@hidden>
References: 
 >Decoding raw AMR (From: Martin Storsjö <email@hidden>)
 >Re: Decoding raw AMR (From: William Stewart <email@hidden>)
 >Re: Decoding raw AMR (From: Martin Storsjö <email@hidden>)
 >Re: Decoding raw AMR (From: William Stewart <email@hidden>)

  • Prev by Date: Re: CocoaAUHost example crasches
  • Next by Date: Re: Macbook and Macbook por Audio loss when plugged into a specific usb port
  • Previous by thread: Re: Decoding raw AMR
  • Next by thread: Re: Decoding raw AMR
  • Index(es):
    • Date
    • Thread