Hi!

I'm trying to get decoded PCM data from a mp3 file using the newly released
NDK.
I have tried different combinations of AudioPlayer and AudioRecorder using
audio source and audio sink like this:

       // configure audio source

    SLDataLocator_AndroidFD loc_fd = {SL_DATALOCATOR_ANDROIDFD, fd, start,
length};

    SLDataFormat_MIME format_mime = {SL_DATAFORMAT_MIME, NULL,
SL_CONTAINERTYPE_UNSPECIFIED};

    SLDataSource audioSrc = {&loc_fd, &format_mime};



        // configure audio sink

    SLDataLocator_AndroidSimpleBufferQueue loc_bq =
{SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, 2};

    SLDataFormat_PCM format_pcm = {SL_DATAFORMAT_PCM, 1, SL_SAMPLINGRATE_16,

        SL_PCMSAMPLEFORMAT_FIXED_16, SL_PCMSAMPLEFORMAT_FIXED_16,

        SL_SPEAKER_FRONT_CENTER, SL_BYTEORDER_LITTLEENDIAN};

    SLDataSink audioSnk = {&loc_bq, &format_pcm};



However I keep getting errors in the log saying that this combination is not
supported.

Does anyone have any ideas how to get PCM data from a MP3 file using OpenSL?
Maybe it is not possible?


Cheers

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to