Android NDK引用Lame动态链接库
LAME is a high quality MPEG Audio Layer III (MP3) encoder
Lame:http://lame.sourceforge.net/
native接口
public class Mp3Lame {
public native static void close();
public native static int encode(short[] buffer_l, short[] buffer_r, int samples, byte[] mp3buf);
public native static int flush(byte[] mp3buf);
public native static void init(int inSampleRate, int outChannel, int outSampleRate, int outBitrate, int quality);
public static void init(int inSampleRate, int outChannel, int outSampleRate, int outBitrate) {
init(inSampleRate, outChannel, outSampleRate, outBitrate, 7);
}
}
C层实现
Android.mk
so库引用
static {
System.loadLibrary("mp3lame");
System.loadLibrary("audio");
}
版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/05/01/android-ndk-reference-lame-dynamic-link-library/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。
THE END
1
二维码
打赏
海报
Android NDK引用Lame动态链接库
LAME is a high quality MPEG Audio Layer III (MP3) encoder
Lame:http://lame.sourceforge.net/
native接口
public class Mp3Lame {
public native s……
文章目录
关闭
共有 0 条评论