I'm using CMdaAudioRecorderUtility class to play/record using a descripter. Whenever I use OpenL() function using TMdaDesClipLocation, the MoscoStateChangeEvent() callback gives me KErrBadDescriptor (-38) error. Can anyone tell me what is going wrong whenever I use a discriptor to open.

The code is as follows:

HBufC8* iMyBuf = HBufC8::NewL(2056);

iLocation.iDes = (TDesC8*) &(iMyBuf->Des());

iMdaAudioRecorderUtility->OpenL(&iLocation, &iFormat,&iCodec);

thanks in advance,