×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    40

    Problem Coversion from AMR to PCM in symbian 6.1

    I do want convert the AMR data into PCM16.. I am reading from amr file and after conversion putting it to pcm file.


    I am using the CAmrToPcmDecoder class. It is converting see the code snippet i wrote:

    TInt k,p,m=1,l=0;
    TBuf8<13> amr;
    m = fl.Read(*pAmr,13);
    pAmrToPcm->Decode((const_cast<TUint8 *>(pAmr->Ptr())),k,(const_cast<TUint8 *>(pPcm->Ptr())),p,0);
    file.Write(*pPcm,320);
    m = fl.Read(*pAmr,13);

    while(((*pAmr).Length()) != 0)
    {

    //file.Write(*pPcm,p);
    pAmrToPcm->Decode((const_cast<TUint8 *>(pAmr->Ptr())),k,(const_cast<TUint8 *>(pPcm->Ptr())),p,0);
    file.Write(*pPcm,p);
    m = fl.Read(*pAmr,k);
    l++;
    }

    where k is returning to 13 and p is returning to 320.

    when I am seeing the pcm file , size is coming to be 285 kb. but when I am playing it...nothing happens.

    Can anybody tells me where am i wrong....please tell me to achieve this.

  2. #2
    Registered User
    Join Date
    Jan 2006
    Posts
    40

    Re: Problem Coversion from AMR to PCM in symbian 6.1

    Can anybody tell what frame size i should take i.e how many bytes are to be read from amr file?

  3. #3
    Registered User
    Join Date
    Jul 2004
    Posts
    22

    Re: Problem Coversion from AMR to PCM in symbian 6.1

    Hi,

    Have u tried using the CMdaAudioConvertUtility? If u have, then what was the outcome?

    Anyway, I suggest u try using it, and initialise it using the function:

    void OpenL(const TDesC& aPrimaryFile,
    TMdaClipLocation* aLocation,
    TMdaClipFormat* aFormat,
    TMdaPackage* aArg1 = NULL,
    TMdaPackage* aArg2 = NULL);

    and use an object of type TMdaRawAudioClipFormat as the 3rd parameter (TMdaClipFormat* aFormat). Not sure of the outcome, but one can always give it a shot :-)

    Best Regards,
    Sameet.

  4. #4
    Registered User
    Join Date
    Jan 2006
    Posts
    40

    Re: Problem Coversion from AMR to PCM in symbian 6.1

    I have tried with this it will not work..

Similar Threads

  1. please Help me ;() Problem with Symbian 6.1 "System Error"
    By checkInfraworlds in forum Symbian
    Replies: 5
    Last Post: 2006-02-10, 12:47
  2. Eclipse Symbian startup problem
    By thongtom in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2005-09-20, 08:19
  3. who knows AMR codec in symbian?
    By liyingxia in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2005-05-31, 02:32
  4. Replies: 0
    Last Post: 2005-03-31, 13:53
  5. Symbian SDK 6.1
    By imrank in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-07-30, 09:29

Posting Permissions

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