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.