简体   繁体   中英

How to change pitch of audio without changing its duration using OpenSL ES or other C/C++ code in Android?

I have problem with changing pitch of audio keeping its duration. I want to change pitch of audio and simultaneously don't change its speed.

I compiled this code but setPitch() method is empty..

Can anyone give me a solution or some hints how to do it using OpenSL ES or other C/C++ code?

I know that java isn't good to do this so I want to do it using C/C++ code.

Sorry for my English! Thanks!

The SoundTouch Audio Processing Library has been developped for that purpose.

It is a great library, but online examples (or documentation) are hard to find. You may have to read the source files to find out how to use it.

This is how it works internally .

You can see the results of a song processed with their library, performing various pitch alterations without altering the tempo here .


EDIT

As of today, I prefer using RubberBand : it usually gives more qualitative results.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM