Android 调用silk编解码的问题

xiaokpeng 2015-08-18 05:27:57
我按照http://my.oschina.net/aiadaniel/blog/91103这篇帖子做了,这个帖子最后生成的java层接口
class SILK8{
/*
* | fs (Hz) | BR (kbps)
* ----------------+---------+---------
* Narrowband | 8000 | 6 -20
* Mediumband | 12000 | 7 -25
* Wideband | 16000 | 8 -30
* Super Wideband | 24000 | 12 -40
*
* Table 1: fs specifies the audio sampling frequency in Hertz (Hz); BR
* specifies the adaptive bit rate range in kilobits per second (kbps).
*
* Complexity can be scaled to optimize for CPU resources in real-time,
* mostly in trade-off to network bit rate. 0 is least CPU demanding and
* highest bit rate.
*/
private static final int DEFAULT_COMPLEXITY = 0;

void load() {
System.loadLibrary("silk8_jni");
}

public native int open(int compression);
public native int decode(byte encoded[], short lin[], int size);
public native int encode(short lin[], int offset, byte encoded[], int size);
public native void close();
}

我想问的是 public native int decode(byte encoded[], short lin[], int size); 这几个参数 我在java里面该怎么填写?
有哪位大神能在这个基础上进行封装下么?只需要传一个源文件路径和转换后的文件路径是最好的
...全文
250 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
老张心得 2018-11-30
  • 打赏
  • 举报
回复
腾讯微信语音中silk转换为MP3的链接https://github.com/zhangchenghai2015/weixin_silk_2_mp3.git
xiaokpeng 2015-08-18
  • 打赏
  • 举报
回复
有大神帮忙解答下么? 感激不尽啊

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧