I trying to convert mp3 file to wav file 8000Hz, 16 bit using SDK S60V2FP2. I use next code:
void CMp3ToWavConverter::ConvertL( ) {   iConverterUtility = CMdaAudioConvertUtility::NewL( *this );   TUid  ControllerUid = {KMmfUidControllerAudio};   TUid  DestFormatUid = {KMmfUidFormatWAVWrite};   TFourCC DestDataType(KMMFFourCCCodePCM16);
  TMdaFileClipLocation sourceClipFile( iAudioSourceFileName );   TMdaFileClipLocation destClipFile( iAudioDistinationFileName );
Converter opening is ok, but after calling iConverterUtility->ConvertL() i get error: -5 KErrNotSupported. I cant find any examples on sdk, how to use CMdaAudioConvertUtility converter. Any ideas will approach how to convert from mp3 file to wav.
I found few unanswered posts similar to this theme on forum, is it possible to convert from mp3 to wav using CMdaAudioConverterUtility?
Can I use CMMFCodec to convert whole mp3 file to wav sample by sample? If I can do it, then i need to retrieve from mp3 file samples to give it to CMMFCodec in order to converting, is it hard?
Or better and fastest will be using of third party library, example MadLib?
I shall try to answer some of my questions itself. I have tried to use a class CMMFCodec, and on the emulator something is converted, however instead of a normal sound I receive only noise. On the 6680 phone I get KErrNotSupported error at attempt to create CMMFCodec object with the following parameters:
Forum posts: 34
Can I use CMMFCodec to convert whole mp3 file to wav sample by sample?
If I can do it, then i need to retrieve from mp3 file samples to give it to CMMFCodec in order to converting, is it hard?
Or better and fastest will be using of third party library, example MadLib?
Sorry for my english,
Thanks
Forum posts: 34
I have tried to use a class CMMFCodec, and on the emulator something is converted, however instead of a normal sound I receive only noise.
On the 6680 phone I get KErrNotSupported error at attempt to create CMMFCodec object with the following parameters:
TFourCC srcDataType (KMMFFourCCCodeMP3);
TFourCC dstDataType (KMMFFourCCCodePCM16);
CMMFCodec* mmfCodec = NULL;
TRAPD (err, mmfCodec = CMMFCodec:: NewL (srcDataType, dstDataType));
Somebody have ideas how to solve this problem?