SoundTouch on Android?

Hey, I'm trying to change the pitch of a sound file in an Android application.

I found the open source library online “SoundTouch” ( http://www.surina.net/soundtouch ), do you think I can use this library in an Android application?

I searched “SoundTouch in Java” in Googling and found this data ( http://www.aplu.ch/classdoc/jaw/ch/aplu/jaw/SoundTouch.html ).

Can I use this library or any ideas about any other libraries or processes that I can use to change the height of the sound file on Android? I also learned the Java Sound API, and android does not support them.: /

Thanks Adam

+4
source share
2 answers

Have you thought about simply changing the sample rate? If you load raw sound bites into memory and play them using the Android AudioTrack class, you can specify a wide range of possible sample rates, and Android will reprogram for you. This will change both the pitch and tempo, for example, playing back a recording at the wrong speed. If you absolutely need to change the pitch without affecting the tempo, you'll need SoundTouch or something like that.

In any case, it is definitely possible, but it will take a lot of work.

To compile SoundTouch you will need Android NDK (proprietary development kit). The Java wrapper you found may be useful, but ultimately you will need to trick your hands in the NDK.

You will also need to write your own code to read the audio file from disk, and then buffer it through SoundTouch and exit the AudioTrack class. MediaPlayer will not help you here.

Finally, note that when you release the application, you will have to comply with the terms of the LGPL.

+4
source

https://github.com/nonameentername/soundtouch-android

please follow the link above and just create using ndk. The soundtrack source is incorrect, so download and replace it. Build on linux enviornment. For any questions, please return to me.

If you want to change the pitch, you can use openal

http://pielot.org/2011/11/10/openal4android-2/

+4
source

All Articles