I'm confused as to how to set pitch natively on Android. I tried altering the native-sound sample from the NDK which uses OpenSL ES, but I get a SL_RESULT_FEATURE_UNSUPPORTED for pretty much anything related to pitch upon requesting the interface. Interfaces tried: SL_IID_PITCH, SL_IID_RATEPITCH, SL_3DDOPPLER
// create audio player
const SLInterfaceID ids[3] = { SL_IID_BUFFERQUEUE, SL_IID_PITCH, SL_IID_VOLUME};
const SLboolean req[3] = {SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE};
result = (*engineEngine)->CreateAudioPlayer(engineEngine, &bqPlayerObject, &audioSrc, &audioSnk,
3, ids, req);
assert(SL_RESULT_SUCCESS == result);
result is always SL_RESULT_UNSUPPORTED
My target is android-19. I tried many others as well to no avail. Am I doing something wrong? Is there an alternative that doesn't require using Java?
Thanks!