Updated copyright message.
[meviz.git] / src / main / java / eu / svjatoslav / meviz / encoder / converters / Midi2Wav.java
1 /*
2  * Meviz - Various tools collection to work with multimedia.
3  * Copyright (C) 2012 -- 2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of version 2 of the GNU General Public License
7  * as published by the Free Software Foundation.
8  */
9
10 package eu.svjatoslav.meviz.encoder.converters;
11
12 import eu.svjatoslav.meviz.encoder.EncodingOptions;
13
14 import java.io.File;
15 import java.util.List;
16
17 public class Midi2Wav extends AbstractConverter {
18
19     @Override
20     public String getCommand(final File inputFile, final File targetFile,
21                              final EncodingOptions options, String targetFormat) {
22
23         return "timidity \"" + inputFile.getAbsolutePath() + "\" -Ow -o \""
24                 + targetFile.getAbsolutePath() + "\"";
25     }
26
27     @Override
28     public List<String> getSourceFileExtensions() {
29         return toList("mid");
30     }
31
32     @Override
33     public List<String> getTargetFileExtensions() {
34         return toList("wav");
35     }
36
37     @Override
38     public boolean isTerminalMandatory() {
39         return true;
40     }
41
42 }