开发学院手机开发Symbian 开发 Symbian中音频API的运用 阅读

Symbian中音频API的运用

 2010-07-22 01:41:00 来源:WEB开发网   
核心提示:}else /* if aIsLocal = EFalse, then record to aFileName; use the device microphone. */{iSound->SetAudioDeviceMode(CMdaAudioRecorderUtility::ETelephonyNonMixe

}

else /* if aIsLocal = EFalse, then record to aFileName; use the device microphone. */

{

iSound->SetAudioDeviceMode(CMdaAudioRecorderUtility::ETelephonyNonMixed);

TInt maxGain = iSound->MaxGain();

iSound->SetGain(maxGain / 2);

}

// Delete current audio sample from beginning of file

iSound->SetPosition(TTimeIntervalMicroSeconds(0));

iSound->CropL();

// start recording

iSound->RecordL(); /× 当录音结束之后仍然会调用此通知方法。使用iSound->Close()方法停止录音和播放(Stops the current operation (playback/recording/conversion).) */

iState = ERecord;

break;

case ERecord:

break;

case EPlayInit:

{

// Play through the device speaker and set to max volume

if(iIsLocal)

{

iSound->SetAudioDeviceMode(CMdaAudioRecorderUtility::ELocal);

}

else

{

iSound->SetAudioDeviceMode(CMdaAudioRecorderUtility::ETelephonyOrLocal);

// iPhone.DeviceSpeakerOff();

}

iSound->SetVolume(iSound->MaxVolume());

// Set the playback position to the start of the file

iSound->SetPosition(TTimeIntervalMicroSeconds(0));

iSound->PlayL(); // 当播放结束之后仍然会调用此通知方法。

iState = EPlay;

// we start the timer

// add a half a second onto the play time to make sure we've finished playing

TInt64 playTime = iSound->Duration().Int64() + KHalfSecond;

if (iTimer)

{

delete iTimer;

iTimer = NULL;

}

iTimer = CAnsPhoneTimer::NewL(*this, playTime.GetTInt());

break;

}

default:

break;

}

}

五. CMdaAudioInputStream

上一页  2 3 4 5 6 7 8  下一页

Tags:Symbian 音频 API

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接