audio decoding in NDK

614 views
Skip to first unread message

Steven Merel

unread,
Feb 4, 2011, 3:00:16 PM2/4/11
to andro...@googlegroups.com
Hi,

I'm getting acquainted with using OpenSL ES through the NDK.  One thing I noticed is that buffer queue players only support PCM audio, while a player that reads from a URI or asset file descriptor can play compressed file formats (MP3, AAC, etc etc).

So.. if I have compressed audio in memory, rather than a file or URI, it seems that I will have to decode it myself, then pass it to a buffer queue.  Is there any Android API for audio decoding?  Or is that all hidden inside the OpenSL implementation?

Also, I'm wondering if any of that decoding would typically have hardware support (in which case, any software decoder I write will be hopelessly slow by comparison), or if it's all done in software, or if that's completely up to the hardware vendor?

thanks!
-steve 

Glenn Kasten

unread,
Feb 5, 2011, 12:17:36 PM2/5/11
to android-ndk
A similar topic came up here about a month ago (see link below to
"Decode MP3 using OpenSL NDK" on 12/28). The summary is that is
platform support for audio decode from app memory to audio output
device, and from app memory to app memory in PCM format are on the
roadmap, but I can't commit to a date. In the mean time a workaround
is to use a software decoder bundled with your app, and you'll be
responsible for complying with any appropriate licensing
requirements.

http://groups.google.com/group/android-ndk/t/b795132da7e6a2d1

Steven Merel

unread,
Feb 6, 2011, 5:53:53 PM2/6/11
to andro...@googlegroups.com
OK, thanks for the info... I will eagerly await decoding support!  :-)
Reply all
Reply to author
Forward
0 new messages