我对这个主题完全是新手。我想在我的应用程序中使用speex编解码器,因为我已经遵循了这个link to include speex lib in android app。我已经完成了所有步骤[获取所有c文件并使用NDK编译它们]和已运行此代码行
static {
System.loadLibrary("speex");
}
private native void initEncoder(int mode, int quality);
private native void destroyEncoder();
private native int encodeFile(String sourcePath, String targetPath);
@
Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initEncoder(AudioManager.ADJUST_RAISE, 5);
File f = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/encoded_file");
encodeFile(Environment.getExternalStorageDirectory().getAbsolutePath() + "/06-Jab Tak Hai Jaan[MusikMaza.Com].mp3", f.getAbsolutePath());
destroyEncoder();
}
并收到此错误
11-06 16:21:12.620: E/AndroidRuntime(32612): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load speex: find Library returned null.
我似乎库没有被错误名称加载。所以请告诉我如何解决这个问题。任何建议/帮助将不胜感激。谢谢提前