//废话不多说直接上代码
//github地址
compile ‘com.github.adrielcafe:AndroidAudioConverter:0.0.8’
//需要在 Application 中初始化
public class Myapplication extends Application {
@Override
public void onCreate() {
super.onCreate();
AndroidAudioConverter.load(this, new ILoadCallback() {
@Override
public void onSuccess() {
// Great!
}
@Override
public void onFailure(Exception error) {
// FFmpeg is not supported by device
}
});
}
//这是录音完成的回调,文件后缀flac使用AndroidAudioConverterUtils工具类进行转换
//这是Activity的回调
@Override
public void onFinishedRecord(String audioPath, String time) {
File file = new File(audioPath);
timeese = time;
addview.setVisibility(View.VISIBLE);
down.setVisibility(Vi