0

I am in need of a library which could convert an AAC audio stream to M4A. We are facing problems while playing AAC on a HTC Desire with android 2.3.3, we get this error:

MediaPlayer.MEDIA_ERROR_SERVER_DIED (100)

I would like to know if there is any spec which i can follow to convert AAC into M4A or any library which could be utilized.

Jonas
  • 121,568
  • 97
  • 310
  • 388
Ash
  • 1,391
  • 15
  • 20

2 Answers2

0

You can make use of ffmpeg or opencore libraries to convert AAC to PCM and play it using AudioTrack.

MGK
  • 7,050
  • 6
  • 34
  • 41
0

M4A is a container format, AAC is a codec. M4A can contain AAC audio (and I believe it's one of the common codecs for M4A along with ALAC (lossless)).

I suppose you have AAC audio in some other container format? If so, you should check out libavformat. However, chances are that the hardware on the HTC does not decode the flavor of AAC you have, so you might need to trancoode or use a software decoder such as ffmpeg.

Krumelur
  • 31,081
  • 7
  • 77
  • 119