I need some help with OpenSL ES - I want to change pitch of mp3 song. The code I used is here: Android : How to change Playback Rate of music using OpenSL ES But it is commented in this example. If I uncomment it - it won't work. After executint the code
result = (*uriPlayerObject)->GetInterface(uriPlayerObject, SL_IID_PITCH,
&uriPlaybackPitch);
assert(SL_RESULT_SUCCESS == result);
uriPlaybackPitch == NULL
LogCat is:
OSLESMediaPlayer(7173): create engine
OSLESMediaPlayer(7173): realize the engine
OSLESMediaPlayer(7173): get the engine interface
OSLESMediaPlayer(7173): create output mix
libOpenSLES(7173): class OutputMix interface 0 requested but unavailable MPH=33
OSLESMediaPlayer(7173): realize the output mix
libOpenSLES(7173): Leaving Object::GetInterface (SL_RESULT_FEATURE_UNSUPPORTED)
libOpenSLES(7173): Leaving PlaybackRate::SetPropertyConstraints (SL_RESULT_FEATURE_UNSUPPORTED)
/OSLESMediaPlayer(7173): Feature Unsupported
libc(7173): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)
Really late here, maybe you've solved it, but that interface is not supported. OpenSL ES for Android is not a full implementation. You can find supported interfaces here: http://mobilepearls.com/labs/native-android-api/ndk/docs/opensles/