×
Namespaces

Variants
Actions

How to convert PCM to AMR

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: User:Kanu123 (30 Jun 2007)
Last edited: hamishwillee (14 Jun 2013)
// Uid of PCM16toAMR codec is 0x101FAF68
CMMFCodec* codec = CMMFCodec::NewL(TUid::Uid(0x101FAF68));
CleanupStack::PushL(codec);
CMMFDescriptorBuffer* srcbuf = CMMFDescriptorBuffer::NewL(320);
CleanupStack::PushL(srcbuf);
// Copy your PCM frame data into srcbuf, for example: srcbuf->Data().Copy(pcmbuf);
CMMFDescriptorBuffer* dstbuf = CMMFDescriptorBuffer::NewL(32);
CleanupStack::PushL(dstbuf);
TCodecProcessResult result = codec->ProcessL(*srcbuf, *dstbuf):
// now the dstbuf contains an AMR frame data
CleanupStack::PopAndDestroy(dstbuf);
CleanupStack::PopAndDestroy(srcbuf);
CleanupStack::PopAndDestroy(codec);
[[Category:]]
This page was last modified on 14 June 2013, at 07:52.
39 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×