我有一个C++
源文件,我想从我的C++
文件中调用一个方法,但我不知道什么是错的。
这是我的cpp方法:
static unsigned ALawEncode(uint8_t* dst, int16_t* src, size_t srcSize);
以下是我想称之为方法的地方:
#include <string.h>
#include <jni.h>
#include <stdint.h>
#include "G711.h"
extern "C" {
uint8_t* Java_com_example_qonclient_Codecs_encodeG711( JNIEnv* env, jobject thiz, int16_t* source ){
size_t size0 = sizeof(source);
G711 g711;
uint8_t *dst;
g711.ALawEncode(dst, source, size0);
return dst;
}
}
你可以帮帮我吗?