【发布时间】:2018-12-15 00:47:41
【问题描述】:
我使用以下代码将 sdcard 中存在的尽可能多的 wav 文件附加到单个文件中。 audFullPath 是一个包含音频文件路径的数组列表。这是对的吗。当我播放录制的audio1时,这样做之后。它只播放第一个文件。我想播放所有文件。任何建议..
File file=new File("/sdcard/AudioRecorder/recordedaudio1.wav");
RandomAccessFile raf = new RandomAccessFile(file, "rw");
for(int i=0;i<audFullPath.size();i++) {
f=new File(audFullPath.get(i));
fileContent = new byte[(int)f.length()];
System.out.println("Filecontent"+fileContent);
raf.seek(raf.length());
raf.writeBytes(audFullPath.get(i));
}
【问题讨论】: