gpt4 book ai didi

android - OpenSL ES 改变音高

转载 作者:行者123 更新时间:2023-11-30 03:25:05 25 4
gpt4 key购买 nike

我需要一些有关 OpenSL ES 的帮助 - 我想改变 mp3 歌曲的音调。我使用的代码在这里:Android : How to change Playback Rate of music using OpenSL ES但是在这个例子中被注释掉了。如果我取消注释 - 它不会工作。执行代码后

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)

最佳答案

真的晚了,也许你已经解决了,但是不支持那个接口(interface)。适用于 Android 的 OpenSL ES 并非完整实现。您可以在此处找到支持的接口(interface):http://mobilepearls.com/labs/native-android-api/ndk/docs/opensles/

关于android - OpenSL ES 改变音高,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18359494/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com