Real-time time stretching and pitch-shifting of audio files with Superpowered SDK in this simple demo for Android
This extends the PlayerExample with the following:
// onSpeedSlider - Handle TimeStretching events.
extern "C" JNIEXPORT void
Java_com_superpowered_playerexample_MainActivity_onSpeedSlider (
JNIEnv * __unused env,
jobject __unused obj,
jint value
) {
player->setTempo((value/10000.0), true);
}
// onPitchSlider - Handle PitchShifting events.
extern "C" JNIEXPORT void
Java_com_superpowered_playerexample_MainActivity_onPitchSlider (
JNIEnv * __unused env,
jobject __unused obj,
jint value
) {
player->setPitchShift(value);
}
Check out in full: https://github.com/peteee/SuperpoweredPlayer/blob/master/app/src/main/cpp/PlayerExample.cpp
Check it out here: https://superpowered.com
Superpowered C++ Audio Library and SDK is the leading C++ Audio Library featuring low-power, real-time latency and cross-platform audio players, audio decoders, Fx (effects), audio I/O, streaming, music analysis and spatialization.
For the most up-to-date feature list, see: https://superpowered.com/audio-library-sdk