×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Playing eaac+ audio format

    Hello friends,

    I am trying to decode and play some of the audio formats. I have made it sucessfully for AAc formats.

    But for some file with extensions .m4a i am facing some pb. I think it is coming under eacc+ catgory.

    and tried as below here
    http://discussion.forum.nokia.com/fo...ad.php?t=93850

    but every time i got err = -1 , and r having value EProcesserror.
    Code:
     TRAPD(err,  r = iMmfDecoder->ProcessL(*src_buf, *dst_buf));
    My cofig value for codec are as below
    Code:
    iMmfDecoder = CMMFCodec::NewL (TUid::Uid(0x10207aa9));
        
       RArray<TInt> configParams;
       CleanupClosePushL(configParams);//KMMFFourCCCodeAAC
    	// [0]
        configParams.Append(44100); // input sample frequency (half the output)
        // [1]
        configParams.Append(2); // output channels
        // [2]
        configParams.Append(1); // shud be 1 as aacplus v2 is based on 1
        // [3]
        configParams.Append(4096); // the doubtful component !!! how to find this one out.. TBD // for sterio
        // [4]
        configParams.Append(1024); // shud be 1024 in this case
        // [5]
        configParams.Append(44100); // sample frequency - same as [0]
        // [6]
        configParams.Append(0); // not used - so do not bother
        // [7]
        configParams.Append(0); // Downsampling mode (0,1) - could be 0 or 1 - to try
        // [8]
        configParams.Append(1200);
        // [9]
        configParams.Append(44100); // out put sample frequency (double the first)
        // [10]
        configParams.Append(5); // - Use PS decoding, when not available it will simply ignore
        // 5 - aac + sbr
        // 6 - aac + sbr + ps
        TUid codecId = TUid::Uid(KUidMmfCodecAudioSettings); // 0x10203622
        TRAPD(err,iMmfDecoder->ConfigureL(codecId, (TDesC8&) configParams));
        CleanupStack::PopAndDestroy(); //configParams.Close();
    Can u please suggest what is the misttake......

    Waiting for ur sooner reply....

    Thanks

  2. #2
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: Playing eaac+ audio format

    Any body any clue . I am completely stuck at this point....

    Please help me .

    what i have observed that when any one of the config parameter are wrong while aac decoding i was also getting same type of error.
    So what i think is it is due to incoorrect parametres in codec config parametres given above.

    But what is wrong...

    Thanks

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Playing eaac+ audio format

    Quick googling revealed that. m4a files are "Files in .M4A format are actually the audio layer of (non-video) MPEG 4 movies. M4A is slated to become the new standard for audio file compression. This format is also known as Apple Lossless, Apple Lossless Encoder, or ALE".

    I suppose that format is currently not supported by S60 devices.

  4. #4
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Playing eaac+ audio format

    Some (most) .m4a files actually contain AAC (or eAAC+?), but it is in an MPEG4 container, so you'd have to extract the audio stream from the container and pass that data to the codec.

    I'm not sure what site provided that info from google, but as far as I know it is incorrect, the format is ordinary MPEG4 and only the extension .m4a comes from Apple - many S60 phones can already play these files via the built-in player (and presumably also the audio player utility).

    Mark

  5. #5
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: Playing eaac+ audio format

    Quote Originally Posted by Sorcery-ltd View Post
    Some (most) .m4a files actually contain AAC (or eAAC+?), but it is in an MPEG4 container, so you'd have to extract the audio stream from the container and pass that data to the codec.

    I'm not sure what site provided that info from google, but as far as I know it is incorrect, the format is ordinary MPEG4 and only the extension .m4a comes from Apple - many S60 phones can already play these files via the built-in player (and presumably also the audio player utility).

    Mark
    Thanks Yucca and Sorcery, for ur kind attention towards my query. Now I want to share a brief abt my observation...

    Hello Yucca , I had gotten similar results by googling abt .m4a file formats.

    And here is a link which describes clearly abt .m4a files
    http://www.poikosoft.com/help/index...._(aacPlus).htm

    Hello Sorcery,

    I have tried to play a .m4a file on local music player of N70 and N95 . but they fails to play it. also i have tried on many diff player like

    1- Core player (it plays but seems like some data missing ).

    2- Helix player (N70 Unrecognised file format.)

    2- ogg player (on N70 it play fine that file).

    But on device specification on this forum for n95 i have seen supported audio formats
    as below
    Code:
    Audio Formats  	AAC, AAC+, AMR-NB, AMR-WB, eAAC, eAAC+, M4A, MIDI Tones (poly 64), Mobile XMF, MP3, MP4, RealAudio 7,8,10, SP-MIDI, True tones, WAV, WMA
    For N70 you will find also similar results.
    Code:
    but it is in an MPEG4 container, so you'd have to extract the audio stream from the container and pass that data to the codec.
    As told above by Sorcery , I have tried initially to play them through simply by CMdaAudioOutputStream but it plays the file but total voice of audio was broken and seems like it was not decoded properly....

    Please suggest....

    Thanks
    Last edited by kishore84; 2009-03-31 at 11:13.

  6. #6
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Playing eaac+ audio format

    The N70 is too old for this, it should work on the N95 though, I'm surprised that it doesn't - it does depend on the exact nature of the file though. M4A is just the extension for an MPEG4 container that only contains audio, not video - it was popularised by the Apple iTunes store. However, it doesn't force the use of a specific codec internally, so the file in question may or may not be supported. Apple's version supported DRM for iTunes - obviously those files won't play on an S60 device and if that's what you have then you're stuck.

    CMdaAudioPlayerUtility is the thing that should work, not CMdaAudioOutputStream, but again, not on the N70.

    If it doesn't work, the thing to do is check the file with some multimedia utility on your PC to find out what codec and bitrate it is using.

    Mark

    P.S. My issue with Jukka's google info was the word lossless - AAC+ is not lossless compression, nor is it an Apple format.

  7. #7
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: Playing eaac+ audio format

    Quote Originally Posted by Sorcery-ltd View Post
    The N70 is too old for this, it should work on the N95 though, I'm surprised that it doesn't - it does depend on the exact nature of the file though. M4A is just the extension for an MPEG4 container that only contains audio, not video - it was popularised by the Apple iTunes store. However, it doesn't force the use of a specific codec internally, so the file in question may or may not be supported. Apple's version supported DRM for iTunes - obviously those files won't play on an S60 device and if that's what you have then you're stuck.

    CMdaAudioPlayerUtility is the thing that should work, not CMdaAudioOutputStream, but again, not on the N70.

    If it doesn't work, the thing to do is check the file with some multimedia utility on your PC to find out what codec and bitrate it is using.



    Mark


    P.S. My issue with Jukka's google info was the word lossless - AAC+ is not lossless compression, nor is it an Apple format.
    Thanks for ur valuable sugestion . sorry I am late.

    I have checked it with CMdaAudioPlayerUtility . But it gives KErrNotSupported directly.

    Anyway Now i am able to play .m4a local files using some aditional plugins .
    But I need to play audio in chunks. Therefore earlier I was going for CMdaAudioOutputStream.

    Now I have observed that if we have some decoder for some format like libamd we can decode a chunk of audio first and send it to CMdaAudioOutputStream for play.
    But if i have the decoder plugin uid then how to use that decoder to decode audio and play that chunk....


    I have tried to configure codec and decode source buf as given in this link
    http://wiki.forum.nokia.com/index.ph...c(_CMMFCodec_)

    But it crashes at the following line
    Code:
     TCodecProcessResult result = encoder->ProcessL(*srcbuf, *dstbuf):
    Is this the right way!!!!!!!!!

    if my query is not clear plaese let me know....



    Thanks
    Last edited by kishore84; 2009-04-07 at 14:06.

  8. #8
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Playing eaac+ audio format

    Please look for other posts on this forum on AAC decoding - the decoder only accepts full frames I believe, that seems to be the most common issue.

    Mark

  9. #9
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: Playing eaac+ audio format

    Quote Originally Posted by Sorcery-ltd View Post
    Please look for other posts on this forum on AAC decoding - the decoder only accepts full frames I believe, that seems to be the most common issue.

    Mark
    Yes I have already gone throgh some similar posts..

    If i have understood ur reply properly u mean to say it is possible to decode it by CMMFCodec.

    Should i use here the inbuilt m4a plugin id. or eacc+ plugin id as given in wiki article.
    http://wiki.forum.nokia.com/index.ph...ring_AAC_codec

    I thnk it should be eAAC+ Decoder UID : 0x10207AA9 .. am i right??

    I have another question - is there any api for streaming (still now i couldnot found out)

    which would take the decoder plugin id as the func below:

    Code:
    OpenFileL()
    IMPORT_C void OpenFileL(const TDesC &aFileName, TUid aRecordControllerUid, TUid aPlaybackControllerUid=TUid::Null(), TUid aDestinationFormatUid=TUid::Null(), TFourCC aDestinationDataType=KFourCCNULL);
    Description
    Opens an audio clip from a file to play back existing audio data or to record new audio data.
    
    Parameters
    const TDesC &aFileName The full path and filename of the file that contains or will contain the audio data. 
     
    TUid aRecordControllerUid The UID of the controller to use for recording. 
     
    TUid aPlaybackControllerUid The UID of the controller to use for playback. If KNullUid is used the same controller is used for playback and recording. 
     
    TUid aDestinationFormatUid The UID of record audio format. 
     
    TFourCC aDestinationDataType Data type for recording
    what i assume is If we can play local .m4a files ...through plugins we should stream these type of files as well....

    Please suggest...

    Thanks
    Last edited by kishore84; 2009-04-08 at 09:55.

  10. #10
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: Playing eaac+ audio format

    Here I am giving some more info.. about my decoder settings.

    Code:
    void MyClass:: ConfigureCodecL()
    {
        iMmfDecoder = CMMFCodec::NewL(TUid::Uid(0x10207AA9));//TUid::Uid(0x101FAF85));//
        RArray<TInt> configParams;
        configParams.Append(44100);
        configParams.Append(2);
        configParams.Append(1);
        configParams.Append(4096);
        configParams.Append(1024);
        configParams.Append(44100);
        configParams.Append(0);
        configParams.Append(0);
        configParams.Append(16);
        configParams.Append(16000);//48000);
        configParams.Append(5);
        const TDesC8& codecData = REINTERPRET_CAST(const TDesC8&, configParams);
       // TRAPD(err , iMmfDecoder->ConfigureL(TUid::Uid(0x101FAF85), codecData)); 
       TRAPD(err,iMmfDecoder->ConfigureL(TUid::Uid(0x10203622), codecData)); 
    }
    But r is always contains EProcessError........for m4a format files...

    Code:
     TRAPD(err,  r = iMmfDecoder->ProcessL(*src_buf, *dst_buf));
    Any thing i am missing!!!!!! or are these parameters incorrect. I have set sample rate and other parameters obtained while playing the same file through vlc on my pc.

    Please suggest...

    Thanks

  11. #11
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Playing eaac+ audio format

    You may well have to skip the MPEG4 header in the M4A file manually and start feeding data to the codec from the beginning of an AAC frame. I haven't tried it myself though.

    If it's a CMMFCodec rather than a HW codec then there isn't an audio streaming API that uses it... there may also be a HW codec but I don't know for sure.

    Mark

Similar Threads

  1. Playing audio on Emulator
    By harshadnatiye in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2009-02-24, 14:30
  2. KErrOverflow (-9) during playing a long audio with APS
    By paipeng in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2008-08-28, 18:13
  3. Playing audio streaming from small chunks.
    By khurshed79 in forum Symbian
    Replies: 1
    Last Post: 2007-07-09, 09:49
  4. Callback after audio file stopped playing
    By gojkoa in forum Symbian
    Replies: 6
    Last Post: 2005-11-18, 09:11
  5. 7650 basic audio recording format
    By gamit in forum Symbian
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×