How to covert AMR data to PCM?
There are many post regarding AMR to PCM or vice-versa. I tried a lot to convert AMR to PCM. It would be really helpful if someone give code snippet for converting AMR to PCM and then playing the PCM.
The following method is for converting the AMR to PCM16. Remember to take off the 6-Bytes header from the begining of AMR file then pass the data to this method.
void CStreamPlayEngine::ConvertAmr2PcmL(const TDesC8& aAmrData,TDes8& aDestBuffer)
TCodecProcessResult result = iOCodec->ProcessL(*iAmrBuffer,*iPcm16Buffer);
if((result.iStatus == TCodecProcessResult::EProcessComplete))
OkMai = ETrue;