Android 调用silk编解码的问题
我按照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里面该怎么填写?
有哪位大神能在这个基础上进行封装下么?只需要传一个源文件路径和转换后的文件路径是最好的