CMdaAudioRecorderUtility->SetDestinationSampleRateL is not affecting recorder

Login to reply to this topic.
Thu, 2005-08-04 12:54
Joined: 2005-05-09
Forum posts: 33
 Hi all,

   I need to record at the sample rate of 16K, Symbian default samplerate is 8K  , so i used CMdaAudioRecorderUtility->SetDestinationSampleRateL(16000) to set the desired sampling rate but it is affecting the recorder and i am getting the wave file with 8k sampling rate.

see the code below


void CRecorderAdapter::RecordL()
    {

      iMdaAudioRecorderUtility->SetDestinationSampleRateL(16000);

    // Record from the device microphone
    iMdaAudioRecorderUtility->SetAudioDeviceMode(CMdaAudioRecorderUtility::ELocal);

    // Set maximum gain for recording
    iMdaAudioRecorderUtility->SetGain(iMdaAudioRecorderUtility->MaxGain());
   
    // Delete current audio sample from beginning of file
    iMdaAudioRecorderUtility->SetPosition(TTimeIntervalMicroSeconds(0));
    iMdaAudioRecorderUtility->CropL();
 
    iMdaAudioRecorderUtility->RecordL();
    }

Fri, 2005-08-19 12:29
Joined: 2005-07-16
Forum posts: 127
Re: CMdaAudioRecorderUtility->SetDestinationSampleRateL is not a
Hi,

The sample rate must be one of the supported bit rates of the data sink. Use GetSupportedSampleRatesL() to retreive a list of supported samples rates for the data sink. Can you check this out?

Regards,
shagor
  • Login to reply to this topic.