PlayBack different voices

落花浮王杯 提交于 2019-12-11 11:25:20

问题


I am working on iphone app, I required multiple voices , e.g. Adult voice become children voice.

How can i implement it, I am using AVFoundation for playing voice.

Plz provide some coded.


回答1:


To implement what you need, you need pitch shifting capabilities. You can use OpenAL to achieve this.

Specifically, in OpenAL, to set pitch you do

alSourcef(source, AL_PITCH, 1.2f); 

where source is the id of the OpenAL sound source.

If you are new to OpenAL, get started here: http://benbritten.com/2008/11/06/openal-sound-on-the-iphone/



来源:https://stackoverflow.com/questions/12745964/playback-different-voices

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!