@Test public void generateMp3ByVBR() throws Exception { String targetMp3FilePath = "app/src/test/java/com/zyl/mp3cutter/mp3cut/logic/new_vbr" + RING_FORMAT; long startTime = 20 * 1000; long endTime = 120 * 1000; Mp3CutLogic helper = new Mp3CutLogic(new File("app/src/test/java/com/zyl/mp3cutter/mp3cut/logic/vbr.mp3")); helper.generateNewMp3ByTime(targetMp3FilePath, startTime, endTime); }
public void generateNewMp3ByTime(String targetFileStr, long beginTime, long endTime) throws Exception { MP3File mp3 = new MP3File(this.mSourceMp3File); MP3AudioHeader header = (MP3AudioHeader) mp3.getAudioHeader(); if (header.isVariableBitRate()) { generateMp3ByTimeAndVBR(header, targetFileStr, beginTime, endTime); } else { generateMp3ByTimeAndCBR(header, targetFileStr, beginTime, endTime); } }
Mp3CutLogic { public void generateNewMp3ByTime(String targetFileStr, long beginTime, long endTime) throws Exception { MP3File mp3 = new MP3File(this.mSourceMp3File); MP3AudioHeader header = (MP3AudioHeader) mp3.getAudioHeader(); if (header.isVariableBitRate()) { generateMp3ByTimeAndVBR(header, targetFileStr, beginTime, endTime); } else { generateMp3ByTimeAndCBR(header, targetFileStr, beginTime, endTime); } } }
Mp3CutLogic { public void generateNewMp3ByTime(String targetFileStr, long beginTime, long endTime) throws Exception { MP3File mp3 = new MP3File(this.mSourceMp3File); MP3AudioHeader header = (MP3AudioHeader) mp3.getAudioHeader(); if (header.isVariableBitRate()) { generateMp3ByTimeAndVBR(header, targetFileStr, beginTime, endTime); } else { generateMp3ByTimeAndCBR(header, targetFileStr, beginTime, endTime); } } Mp3CutLogic(File mp3File); }
Mp3CutLogic { public void generateNewMp3ByTime(String targetFileStr, long beginTime, long endTime) throws Exception { MP3File mp3 = new MP3File(this.mSourceMp3File); MP3AudioHeader header = (MP3AudioHeader) mp3.getAudioHeader(); if (header.isVariableBitRate()) { generateMp3ByTimeAndVBR(header, targetFileStr, beginTime, endTime); } else { generateMp3ByTimeAndCBR(header, targetFileStr, beginTime, endTime); } } Mp3CutLogic(File mp3File); File getmSourceMp3File(); void setmSourceMp3File(File mSourceMp3File); void generateNewMp3ByTime(String targetFileStr, long beginTime, long endTime); }
Mp3CutLogic { public void generateNewMp3ByTime(String targetFileStr, long beginTime, long endTime) throws Exception { MP3File mp3 = new MP3File(this.mSourceMp3File); MP3AudioHeader header = (MP3AudioHeader) mp3.getAudioHeader(); if (header.isVariableBitRate()) { generateMp3ByTimeAndVBR(header, targetFileStr, beginTime, endTime); } else { generateMp3ByTimeAndCBR(header, targetFileStr, beginTime, endTime); } } Mp3CutLogic(File mp3File); File getmSourceMp3File(); void setmSourceMp3File(File mSourceMp3File); void generateNewMp3ByTime(String targetFileStr, long beginTime, long endTime);  }