diff webapp/WEB-INF/src/TestEchoClass.java @ 8:76f809129f98

build file now correctly compiling the TestEchoClass; the TestEchoClass now calls the matlab function with the output filename arg.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Fri, 29 Nov 2013 13:04:29 +0000
parents ac4aa1922f32
children 1eb7ec525d3c
line wrap: on
line diff
--- a/webapp/WEB-INF/src/TestEchoClass.java	Thu Nov 28 11:30:56 2013 +0000
+++ b/webapp/WEB-INF/src/TestEchoClass.java	Fri Nov 29 13:04:29 2013 +0000
@@ -20,21 +20,22 @@
         try {
             echo = new HumanEcho();
 
+            // Matlab structure:
+            // Input = struct('dist', 0.9, 'azim', 0, 'orient', 'horz', 'dirweight', 0.2, 'outputfname', 'foo.wav')
 
-            // Matlab structure:
-            // Input = struct('dist', 0.9, 'azim', 0, 'orient', 'horz', 'dirweight', 0.2)
-
-            String[] InputStructFields = {"dist", "azim", "orient", "dirweight"};
+            String[] InputStructFields = {"dist", "azim", "orient", "dirweight", "outputfname"};
             Input = new MWStructArray(1, 1, InputStructFields);
             Input.set("dist", 1, Double.valueOf(0.9));
             Input.set("azim", 1, Double.valueOf(0));
             Input.set("orient", 1, "horz");
             Input.set("dirweight", 1, Double.valueOf(0.2));
+            Input.set("outputfname", 1, "yeah.wav");
+
 
             Object[] result = echo.simulateBinauralSignals(Input);
 
-            MWNumericArray array = (MWNumericArray)result[0];
-            //square = (double[][])array.toArray();
+            // MWNumericArray array = (MWNumericArray)result[0];
+            // square = (double[][])array.toArray();
 
         }
         catch(MWException e) {