Mercurial > hg > human-echolocation-java-webapp
comparison src/HumanEchoServlet.java @ 46:84d02afe28e6
Supply dirname and filename separately
author | Chris Cannam |
---|---|
date | Fri, 28 Feb 2014 13:41:45 +0000 |
parents | 65a26b38bf43 |
children | 398a53b30079 |
comparison
equal
deleted
inserted
replaced
45:c42239ab6084 | 46:84d02afe28e6 |
---|---|
110 Input.set("dist", 1, Double.valueOf(dist)); | 110 Input.set("dist", 1, Double.valueOf(dist)); |
111 Input.set("azim", 1, Double.valueOf(azim)); | 111 Input.set("azim", 1, Double.valueOf(azim)); |
112 Input.set("orient", 1, "horz"); | 112 Input.set("orient", 1, "horz"); |
113 Input.set("dirweight", 1, Double.valueOf(0.2)); | 113 Input.set("dirweight", 1, Double.valueOf(0.2)); |
114 | 114 |
115 Input.set("outdir", 1, wavdir); | |
116 | |
115 // the ofname should depend on the parameters | 117 // the ofname should depend on the parameters |
116 StringBuilder sb = new StringBuilder(); | 118 StringBuilder sb = new StringBuilder(); |
117 sb.append("e_d"); | 119 sb.append("e_d"); |
118 sb.append(dist); | 120 sb.append(dist); |
119 sb.append("_a"); | 121 sb.append("_a"); |
120 sb.append(azim); | 122 sb.append(azim); |
121 sb.append(".wav"); | |
122 outputfname = sb.toString(); | 123 outputfname = sb.toString(); |
123 | 124 |
124 Input.set("outputfname", 1, outputfname); | 125 Input.set("outname", 1, outputfname); |
125 | 126 |
126 // todo: before calling should test if wav already exists.. | 127 // todo: before calling should test if wav already exists.. |
127 Object[] result = echo.simulateBinauralSignals(Input); | 128 Object[] result = echo.simulateBinauralSignals(Input); |
128 } | 129 } |
129 catch(MWException e) { | 130 catch(MWException e) { |