@Ignore @Test public void shouldRenderMelodyWithReverb(){ final Integer frequencyCutoff = 1000; eqFilterRenderer.render(sourcePath, targetPath, frequencyCutoff); assertThat(new File(sourcePath).exists()).isFalse(); assertThat(new File(targetPath).exists()).isTrue(); }
public void render(String sourceFile, String targetFile, Integer frequencyCutoff) { Process processDuration; StringBuilder strBuild = new StringBuilder(); try { processDuration = new ProcessBuilder(appConfigs.getSoxLocation(), sourceFile, targetFile, "highpass", frequencyCutoff.toString()).redirectErrorStream(true).start(); try (BufferedReader processOutputReader = new BufferedReader(new InputStreamReader(processDuration.getInputStream(), Charset.defaultCharset()))) { String line; while ((line = processOutputReader.readLine()) != null) { strBuild.append(line + System.lineSeparator()); } processDuration.waitFor(); } } catch (Exception e) { Application.logger.debug("LOG:", e); } String outputJson = strBuild.toString().trim(); new File(sourceFile).delete(); }
EqFilterRenderer { public void render(String sourceFile, String targetFile, Integer frequencyCutoff) { Process processDuration; StringBuilder strBuild = new StringBuilder(); try { processDuration = new ProcessBuilder(appConfigs.getSoxLocation(), sourceFile, targetFile, "highpass", frequencyCutoff.toString()).redirectErrorStream(true).start(); try (BufferedReader processOutputReader = new BufferedReader(new InputStreamReader(processDuration.getInputStream(), Charset.defaultCharset()))) { String line; while ((line = processOutputReader.readLine()) != null) { strBuild.append(line + System.lineSeparator()); } processDuration.waitFor(); } } catch (Exception e) { Application.logger.debug("LOG:", e); } String outputJson = strBuild.toString().trim(); new File(sourceFile).delete(); } }
EqFilterRenderer { public void render(String sourceFile, String targetFile, Integer frequencyCutoff) { Process processDuration; StringBuilder strBuild = new StringBuilder(); try { processDuration = new ProcessBuilder(appConfigs.getSoxLocation(), sourceFile, targetFile, "highpass", frequencyCutoff.toString()).redirectErrorStream(true).start(); try (BufferedReader processOutputReader = new BufferedReader(new InputStreamReader(processDuration.getInputStream(), Charset.defaultCharset()))) { String line; while ((line = processOutputReader.readLine()) != null) { strBuild.append(line + System.lineSeparator()); } processDuration.waitFor(); } } catch (Exception e) { Application.logger.debug("LOG:", e); } String outputJson = strBuild.toString().trim(); new File(sourceFile).delete(); }  }
EqFilterRenderer { public void render(String sourceFile, String targetFile, Integer frequencyCutoff) { Process processDuration; StringBuilder strBuild = new StringBuilder(); try { processDuration = new ProcessBuilder(appConfigs.getSoxLocation(), sourceFile, targetFile, "highpass", frequencyCutoff.toString()).redirectErrorStream(true).start(); try (BufferedReader processOutputReader = new BufferedReader(new InputStreamReader(processDuration.getInputStream(), Charset.defaultCharset()))) { String line; while ((line = processOutputReader.readLine()) != null) { strBuild.append(line + System.lineSeparator()); } processDuration.waitFor(); } } catch (Exception e) { Application.logger.debug("LOG:", e); } String outputJson = strBuild.toString().trim(); new File(sourceFile).delete(); }  void render(String sourceFile, String targetFile, Integer frequencyCutoff); }
EqFilterRenderer { public void render(String sourceFile, String targetFile, Integer frequencyCutoff) { Process processDuration; StringBuilder strBuild = new StringBuilder(); try { processDuration = new ProcessBuilder(appConfigs.getSoxLocation(), sourceFile, targetFile, "highpass", frequencyCutoff.toString()).redirectErrorStream(true).start(); try (BufferedReader processOutputReader = new BufferedReader(new InputStreamReader(processDuration.getInputStream(), Charset.defaultCharset()))) { String line; while ((line = processOutputReader.readLine()) != null) { strBuild.append(line + System.lineSeparator()); } processDuration.waitFor(); } } catch (Exception e) { Application.logger.debug("LOG:", e); } String outputJson = strBuild.toString().trim(); new File(sourceFile).delete(); }  void render(String sourceFile, String targetFile, Integer frequencyCutoff); @Autowired
    public AppConfigs appConfigs; }