Android 改变音高

Android 改变音高,android,audio,android-ndk,pitch,opensl,Android,Audio,Android Ndk,Pitch,Opensl,我需要一些OpenSL ES的帮助-我想改变mp3歌曲的音高。我使用的代码如下:但在本例中对其进行了注释。如果我取消它的注释-它将不起作用。在执行代码之后 result = (*uriPlayerObject)->GetInterface(uriPlayerObject, SL_IID_PITCH, &uriPlaybackPitch); assert(SL_RESULT_SUCCESS == result); uriPlaybackPitch==

我需要一些OpenSL ES的帮助-我想改变mp3歌曲的音高。我使用的代码如下:但在本例中对其进行了注释。如果我取消它的注释-它将不起作用。在执行代码之后

result = (*uriPlayerObject)->GetInterface(uriPlayerObject, SL_IID_PITCH,
            &uriPlaybackPitch);
    assert(SL_RESULT_SUCCESS == result);
uriPlaybackPitch==NULL

LogCat是:

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)

真的很晚了,也许你已经解决了,但是这个接口不受支持。Android版OpenSL ES不是一个完整的实现。您可以在这里找到支持的接口:

这里很晚了,也许您已经解决了它,但该接口不受支持。Android版OpenSL ES不是一个完整的实现。您可以在此处找到支持的接口:

文档概述了Android支持的接口。

文档概述了Android支持的接口。

链接似乎离线链接似乎离线