MP3 or MP4 recording with CMdaAudioRecorderUtility in S60 3rd

Login to reply to this topic.
Fri, 2008-09-05 09:17
Joined: 2003-12-05
Forum posts: 683

Hi,

Have a problem with recording audio to MP3 format. When trying to do this, OpenFileL just leaves with -1 (KErrNotFound). When recording with MP4 format, recording works but playback sounds like Donald Duck (while I do not when I speak), it's way too fast.

I tried setting the SetDestinationSampleRateL and SetDestinationBitRatesL but no success.

Recording with wav with the same piece of code works perfectly.

Any ideas how to fix? Is it just impossible to record MP3/4 on this platform?


Tue, 2008-09-09 14:35
Joined: 2007-09-20
Forum posts: 116
Re:MP3 or MP4 recording with CMdaAudioRecorderUtility in S60 3rd

Hi,

I suppose MP3 recording is not supported by the device you can check the supported data types by calling "GetSupportedDestinationDataTypesL" method.
Concerning the voice quality set the appropriate channel mode along with sample rate (SetDestinationNumberOfChannelsL).


Chao,
Raghav

Wed, 2008-09-10 07:07
Joined: 2003-12-05
Forum posts: 683
Re: MP3 or MP4 recording with CMdaAudioRecorderUtility ...

Thanks for the reply. Yes, I already checked the supported destination datatypes on the device and noticed mp3 is not supported. However, trying to set the number of channels to mono just caused a leave with KErrNotSupported.

Thu, 2008-09-11 12:35
Joined: 2007-09-20
Forum posts: 116
Re:MP3 or MP4 recording with CMdaAudioRecorderUtility in S60 3rd

Hi,

Do you have any idea whether the encoding is accelerated or done by the soft codec?
The quality problem you mentioned seems like due to incorrect setting of sampling frequency and channels.

it's way too fast

This can happen when the encoder is getting data with sampling rate lower than it is configured to receive. E.g: if it is configured to get data @ 16K stereo but instead it receives 8K stereo, then the playback will be garbled and usually twice as fast as original sound, also the play time will be half the original record time (this is just one of the possible possibilities Smiling ).
May be this will give you a hint about the correct configuration to be used.
You can also check the file properties for the bitrate, sampling freq and channels. This will give you a definitive hint about mismatch in config.

What sample rate you are using in your application? Is it higher than 8K?


Chao,
Raghav

  • Login to reply to this topic.