我在我的应用程序中使用audioRecord而不是mediarecorder它工作正常但我有一个逻辑,高度依赖于maxamplitude这是很难获得使用audiorecord这里是我在阅读缓冲区时使用的
private void writeAudioDataToFile(){
byte data[] = new byte[bufferSize];
String filename = getTempFilename();
FileOutputStream os = null;
try {
os = new FileOutputStream(filename);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
int read = 0;
max=0;
if(null != os){
while(isRecording){
read = recorder.read(buffer, 0, bufferSize);
int ab = (buffer[0] & 0xff) << 8 | buffer[1];
amplitude = Math.abs(ab);
if(amplitude>0&&litude<25000)
isSilence=true;
else
isSilence=false;
//System.out.println(">>>>>>>>>>>"+amplitude);
if(AudioRecord.ERROR_INVALID_OPERATION != read){
try {
os.write(buffer);
} catch (IOException e) {
e.printStackTrace();
} …Run Code Online (Sandbox Code Playgroud) 我能够在我的项目创建的Android.mk文件中编译并添加ffmpeg到jni文件夹现在我想使用ffmpeg从我存储在静态arraylist中的图像创建一个视频文件
我已经搜索了很多,但找不到任何教程任何帮助真的很感激.
我正在开发一个应用程序,该设备正在800*480分辨率的设备上进行测试,但它是一个mdpi设置并且同样选择资源Micromax Funbook(便宜的东西).http://www.micromaxfunbook.com/
所有布局都搞砸了在该设备上的测试,我如何相应地设计我的布局.