Although the specification says that CMdaAudioPlayerUtility can play Wave, AMR, MIDI, AAC and Real Audio, it can not play the AMR file.

I used like following:

_LIT(KAmrFile,"c:\\test.amr");

void ConstructL()
{
CMdaAudioPlayerUtility* iPlayerFile;
iPlayerFile = CMdaAudioPlayerUtility::NewFilePlayerL(KAmrFile,*this);
}

//Callback function
void CAudioPlayerEngine::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& /*aDuration*/)
{
if (aError == KErrNone)
{
iPlayerFile->SetVolume(iPlayerFile->MaxVolume() / KToneVolumeDenominator);
iPlayerFile->Play();
}
}

As soon as the iPlayerFile is constructed with the KAmrFile, Framework should call MapcInitComplete(..) function, where I should get kErrNone. Function always returned with error for AMR file. But If I use Wave file in:
iPlayerFile = CMdaAudioPlayerUtility::NewFilePlayerL(KWavFile,*this);
Then it plays the file. Meaning MapcInitComplete function is called with KErrNone. It seems like it can not evet open the AMR file. I tested MP3 which does not work as well.

Nokia has a documentation about using MMF where it is discussed about CMdaPlayerUtility. Please take a look at the following link:
http://sw.nokia.com/id/829fbb19-e7fb...pp_v1_0_en.pdf