package com.coolsoft.app.oklight;
import java.io.File;
import java.io.IOException;
import android.media.MediaRecorder;
import android.os.Handler;
import android.util.Log;
import android.widget.ImageView;
/**
* amr音频处理
*
* @author hongfa.yy
* @version 创建时间2012-11-21 下午4:33:28
*/
public class RecordManager {
private final String TAG = "RecordManager";
private MediaRecorder mMediaRecorder;
public static final int MAX_LENGTH = 1000 * 60 * 10;// 最大录音时长1000*60*10;
private File file;
public RecordManager(File file,ImageView view) {
this.file = file;
this.view=view;
}
public RecordManager(File file) {
this.file = file;
}
private long startTime;
private long endTime;
/**
* 开始录音 使用amr格式
*
* @param mRecAudioFile
* 录音文件
* @return
*/
public void startRecord() {
// 开始录音
/* ①Initial:实例化MediaRecorder对象 */
if (mMediaRecorder == null)
mMediaRecorder &
Android 获取话筒声音波动
最新推荐文章于 2024-07-10 03:19:16 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)