Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

向音频播放器增加混响效果

From Wiki
Jump to: navigation, search
Article Metadata

代码示例
兼容于
平台: S60 3rd Edition

平台安全性
需要的签名: Self-Signed
能力: None

文章
翻译:
hoolee
最后由 hamishwillee 在 14 Jun 2013 编辑
  • 详细描述

S60有几个音频增加API可以用来修改音频体验,其中一个就是CEnvironmentalReverbUtility下列代码自签名即可解决

  • 预置条件

音频播放器必须先在构造这个类实例之前生成。可以通过下列代码生成

iMdaAudioPlayerUtility =
CMdaAudioPlayerUtility::NewFilePlayerL(aFileName,
*this,
EMdaPriorityNormal,
EMdaPriorityPreferenceTimeAndQuality);


MMP文件

需要下列能力和链接库

CAPABILITY NONE 
 
LIBRARY EnvironmentalReverbUtility.lib
 
HEADER environmentalreverbutility.h


源文件

首先你需要构建实例类

iEnvironmentalReverbUtility =
CEnvironmentalReverbUtility::NewL(*iMdaAudioPlayerUtility);

你可以使用下列代码询问混响预设

TArray<TEfEnvironmentalReverbUtilityPreset> allPresets =
iEnvironmentalReverbUtility->Presets();

然后设置,使用预设列表的index值

iEnvironmentalReverbUtility->ApplyPresetL(preSetIndex);
// where preSetIndex is
// 0 .. (iEnvironmentalReverbUtility->Presets().Count() – 1)

测试实例

File:PlayerExtrasExample.zip

This page was last modified on 14 June 2013, at 04:58.
259 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×