make mp3decoder compile
authoryeom <yeom>
Tue, 12 Jul 2011 21:54:22 +0000 (21:54 +0000)
committeryeom <yeom>
Tue, 12 Jul 2011 21:54:22 +0000 (21:54 +0000)
12 files changed:
Robust/src/ClassLibrary/SSJava/ByteArrayInputStream.java
Robust/src/ClassLibrary/SSJava/Character.java [new file with mode: 0644]
Robust/src/ClassLibrary/SSJava/IOException.java [new file with mode: 0644]
Robust/src/ClassLibrary/SSJava/Long.java
Robust/src/ClassLibrary/SSJava/String.java
Robust/src/Tests/ssJava/mp3decoder/JavaLayerHook.java
Robust/src/Tests/ssJava/mp3decoder/JavaLayerUtils.java
Robust/src/Tests/ssJava/mp3decoder/LayerIIDecoder.java
Robust/src/Tests/ssJava/mp3decoder/LayerIIIDecoder.java
Robust/src/Tests/ssJava/mp3decoder/Player.java
Robust/src/Tests/ssJava/mp3decoder/SynthesisFilter.java
Robust/src/Tests/ssJava/mp3decoder/huffcodetab.java

index eb05a83..1d26f36 100644 (file)
@@ -245,7 +245,7 @@ public class ByteArrayInputStream extends InputStream
     // ints will always fit in an int.  Since we have to return a long
     // anyway, numBytes might as well just be a long.
     long numBytes = Math.min((long) (count - pos), num < 0 ? 0L : num);
-    pos += numBytes;
+    pos +=(int)numBytes;
     return numBytes;
   }
 }
\ No newline at end of file
diff --git a/Robust/src/ClassLibrary/SSJava/Character.java b/Robust/src/ClassLibrary/SSJava/Character.java
new file mode 100644 (file)
index 0000000..3e41281
--- /dev/null
@@ -0,0 +1,73 @@
+public class Character {
+
+  public static int digit(char ch, int radix) {
+    if (ch>='0'&&ch<='9')
+      return ch-'0';
+    else if (ch>='a'&&ch<='z') {
+      int val=(ch-'a')+10;
+      if (val<radix)
+        return val;
+    } else if (ch>='A'&&ch<='Z') {
+      int val=(ch-'A')+10;
+      if (val<radix)
+        return val;
+    }
+    return -1;
+  }
+
+  public static boolean isDigit(char ch) {
+    // TODO This is a temparory implementation, there are other groups of digits
+    // besides '0' ~ '9'
+    if (ch>='0'&&ch<='9')
+      return true;
+    else
+      return false;
+  }
+
+  char value;
+
+  public Character(char c) {
+    value = c;
+  }
+
+  public Character(Character c) {
+    value = c.value;
+  }
+
+  public String toString() {
+    return ""+value;
+  }
+
+  public static boolean isWhitespace(char character) {
+    boolean returnValue;
+    if ( (character == '\t') ||
+         (character == '\n') ||
+         (character == ' ') ||
+         (character == '\u000C') ||
+         (character == '\u001C') ||
+         (character == '\u001D') ||
+         (character == '\u001E') ||
+         (character == '\u001F')) {
+      returnValue = true;
+    } else {
+      returnValue = false;
+    }
+    return returnValue;
+  }
+
+  public static final int MIN_RADIX = 2;
+  public static final int MAX_RADIX = 36;
+
+  public static char forDigit(int digit, int radix) {
+    if ((digit >= radix) || (digit < 0)) {
+      return '\0';
+    }
+    if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX)) {
+      return '\0';
+    }
+    if (digit < 10) {
+      return (char)('0' + digit);
+    }
+    return (char)('a' - 10 + digit);
+  }
+}
diff --git a/Robust/src/ClassLibrary/SSJava/IOException.java b/Robust/src/ClassLibrary/SSJava/IOException.java
new file mode 100644 (file)
index 0000000..aba1444
--- /dev/null
@@ -0,0 +1,74 @@
+/* IOException.java -- Generic input/output exception
+   Copyright (C) 1998, 1999, 2001, 2002, 2005  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+//package java.io;
+
+/**
+  * This exception is thrown to indicate an I/O problem of some sort
+  * occurred.  Since this is a fairly generic exception, often a subclass
+  * of IOException will actually be thrown in order to provide a more
+  * detailed indication of what happened.
+  *
+  * @author Aaron M. Renn (arenn@urbanophile.com)
+  * @author Tom Tromey (tromey@cygnus.com)
+  * @status updated to 1.4
+  */
+public class IOException extends Exception
+{
+  /**
+   * Compatible with JDK 1.0+.
+   */
+  private static final long serialVersionUID = 7818375828146090155L;
+
+  /**
+   * Create an exception without a descriptive error message.
+   */
+  public IOException()
+  {
+  }
+
+  /**
+   * Create an exception with a descriptive error message.
+   *
+   * @param message the descriptive error message
+   */
+  public IOException(String message)
+  {
+    super(message);
+  }
+} // class IOException
\ No newline at end of file
index e0e06cf..b53033b 100644 (file)
@@ -36,7 +36,7 @@ obligated to do so.  If you do not wish to do so, delete this
 exception statement from your version. */
 
 
-package java.lang;
+//package java.lang;
 
 /**
  * Instances of class <code>Long</code> represent primitive
index d5f9821..131b769 100644 (file)
@@ -1,5 +1,7 @@
 import Object;
 import String;
+import StringBuffer;
+import System;
 
 @LATTICE("V<C, V<O")
 @METHODDEFAULT("O<V,V<C,C<IN,THISLOC=O,C*")
@@ -22,6 +24,17 @@ public class String {
     this.offset=0;
   }
   
+  public String(char str[], int offset, int length) {
+    if (length>(str.length-offset))
+      length=str.length-offset;
+    char charstr[]=new char[length];
+    for(int i=0; i<length; i++)
+      charstr[i]=str[i+offset];
+    this.value=charstr;
+    this.count=length;
+    this.offset=0;
+  }
+  
 
   public String(byte str[], String encoding) {
     int length = this.count;
@@ -40,6 +53,14 @@ public class String {
     this.count=str.count;
     this.offset=str.offset;
   }
+  
+  public String(StringBuffer strbuf) {
+    value=new char[strbuf.length()];
+    count=strbuf.length();
+    offset=0;
+    for(int i=0; i<count; i++)
+      value[i]=strbuf.value[i];
+  }
 
   public String(@LOC("IN") char c) {
     @LOC("V") char[] str = new char[1];
@@ -56,6 +77,12 @@ public class String {
     this.count=str.length;
     this.offset=0;
   }
+  
+  public String(String str) {
+    this.value=str.value;
+    this.count=str.count;
+    this.offset=str.offset;
+  }
 
   @LATTICE("O<V,V<C,C<IN,THISLOC=IN,C*")
   @RETURNLOC("O")
@@ -98,6 +125,42 @@ public class String {
     return true;
   }
   
+  public void getChars(char dst[], int dstBegin) {
+    getChars(0, count, dst, dstBegin);
+  }
+
+  public void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin) {
+    if((srcBegin < 0) || (srcEnd > count) || (srcBegin > srcEnd)) {
+      // FIXME
+      System.printString("Index error: "+srcBegin+" "+srcEnd+" "+count+"\n"+this);
+      System.exit(-1);
+    }
+    int len = srcEnd - srcBegin;
+    int j = dstBegin;
+    for(int i=srcBegin; i<srcEnd; i++)
+      dst[j++]=value[i+offset];
+    return;
+  }
+  
+  public int indexOf(String str, int fromIndex) {
+    if (fromIndex<0)
+      fromIndex=0;
+    for(int i=fromIndex; i<=(count-str.count); i++)
+      if (regionMatches(i, str, 0, str.count))
+        return i;
+    return -1;
+  }
+  
+  public boolean regionMatches(int toffset, String other, int ooffset, int len) {
+    if (toffset<0 || ooffset <0 || (toffset+len)>count || (ooffset+len)>other.count)
+      return false;
+    for(int i=0; i<len; i++)
+      if (other.value[i+other.offset+ooffset]!=
+          this.value[i+this.offset+toffset])
+        return false;
+    return true;
+  }
+  
   @RETURNLOC("O")
   public static String valueOf(@LOC("IN") Object o) {
     if (o==null)
@@ -159,6 +222,9 @@ public class String {
     s.value=chararray;
     return s;
   }
+  
+  public static native int convertdoubletochar(double val, char [] chararray);
+
 
   public static String valueOf(long x) {
     int length=0;
index 2096d65..eda09de 100644 (file)
@@ -18,7 +18,7 @@
  */\r
 \r
 \r
-import java.io.InputStream;\r
+//import java.io.InputStream;\r
 \r
 /**\r
  * The <code>JavaLayerHooks</code> class allows developers to change\r
index 9a32c5b..13f2ac0 100644 (file)
  */\r
 \r
 \r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.io.InvalidClassException;\r
-import java.io.InvalidObjectException;\r
-import java.io.ObjectInputStream;\r
-import java.io.ObjectOutputStream;\r
-import java.io.OutputStream;\r
-import java.lang.reflect.Array;\r
+//import java.io.IOException;\r
+//import java.io.InputStream;\r
+//import java.io.InvalidClassException;\r
+//import java.io.InvalidObjectException;\r
+//import java.io.ObjectInputStream;\r
+//import java.io.ObjectOutputStream;\r
+//import java.io.OutputStream;\r
+//import java.lang.reflect.Array;\r
 \r
 /**\r
  * The JavaLayerUtils class is not strictly part of the JavaLayer API.\r
@@ -43,17 +43,19 @@ public class JavaLayerUtils
         * @param in    The input stream to deserialize an object from.\r
         * @param cls   The expected class of the deserialized object. \r
         */\r
-       static public Object deserialize(InputStream in, Class cls)\r
+//     static public Object deserialize(InputStream in, Class cls)\r
+       static public Object deserialize(InputStream in)\r
                throws IOException\r
        {\r
-               if (cls==null)\r
-                       throw new NullPointerException("cls");\r
+//             if (cls==null)\r
+//                     throw new NullPointerException("cls");\r
                \r
-               Object obj = deserialize(in, cls);\r
-               if (!cls.isInstance(obj))\r
-               {\r
-                       throw new InvalidObjectException("type of deserialized instance not of required class.");\r
-               }\r
+//             Object obj = deserialize(in, cls);\r
+            Object obj = deserialize(in);\r
+//             if (!cls.isInstance(obj))\r
+//             {\r
+//                     throw new InvalidObjectException("type of deserialized instance not of required class.");\r
+//             }\r
                \r
                return obj;\r
        }\r
@@ -79,6 +81,8 @@ public class JavaLayerUtils
                if (in==null)\r
                        throw new NullPointerException("in");\r
                \r
+               //TODO : need to enable after having objectinputstream\r
+               /*\r
                ObjectInputStream objIn = new ObjectInputStream(in);\r
                \r
                Object obj;\r
@@ -93,6 +97,8 @@ public class JavaLayerUtils
                }\r
                \r
                return obj;\r
+               */\r
+               return null;\r
        }\r
 \r
        /**\r
@@ -106,46 +112,58 @@ public class JavaLayerUtils
         * @param length        The expected length of the array, or -1 if\r
         *                                      any length is expected.\r
         */\r
-       static public Object deserializeArray(InputStream in, Class elemType, int length)\r
-               throws IOException\r
-       {\r
-               if (elemType==null)\r
-                       throw new NullPointerException("elemType");\r
-               \r
-               if (length<-1)\r
-                       throw new IllegalArgumentException("length");\r
-               \r
-               Object obj = deserialize(in);\r
-               \r
-               //SSJava will never throw exceptions as it is so this code is meaningless\r
-               /*\r
-               Class cls = obj.getClass();\r
-               \r
-               if (!cls.isArray())\r
-                       throw new InvalidObjectException("object is not an array");\r
-               \r
-               Class arrayElemType = cls.getComponentType();\r
-               if (arrayElemType!=elemType)\r
-                       throw new InvalidObjectException("unexpected array component type");\r
-                               \r
-               if (length != -1)\r
-               {\r
-                       int arrayLength = Array.getLength(obj);\r
-                       if (arrayLength!=length)\r
-                               throw new InvalidObjectException("array length mismatch");\r
-               }\r
-               */\r
-               return obj;\r
-       }\r
+           static public Object deserializeArray(InputStream in, int length)\r
+         throws IOException\r
+    {\r
+         if (length<-1)\r
+              throw new IllegalArgumentException("length");\r
+         \r
+         Object obj = deserialize(in);\r
+         \r
+         return obj;\r
+    }\r
+//     static public Object deserializeArray(InputStream in, Class elemType, int length)\r
+//             throws IOException\r
+//     {\r
+//             if (elemType==null)\r
+//                     throw new NullPointerException("elemType");\r
+//             \r
+//             if (length<-1)\r
+//                     throw new IllegalArgumentException("length");\r
+//             \r
+//             Object obj = deserialize(in);\r
+//             \r
+//             //SSJava will never throw exceptions as it is so this code is meaningless\r
+//             /*\r
+//             Class cls = obj.getClass();\r
+//             \r
+//             if (!cls.isArray())\r
+//                     throw new InvalidObjectException("object is not an array");\r
+//             \r
+//             Class arrayElemType = cls.getComponentType();\r
+//             if (arrayElemType!=elemType)\r
+//                     throw new InvalidObjectException("unexpected array component type");\r
+//                             \r
+//             if (length != -1)\r
+//             {\r
+//                     int arrayLength = Array.getLength(obj);\r
+//                     if (arrayLength!=length)\r
+//                             throw new InvalidObjectException("array length mismatch");\r
+//             }\r
+//             */\r
+//             return obj;\r
+//     }\r
 \r
-       static public Object deserializeArrayResource(String name, Class elemType, int length)\r
+//     static public Object deserializeArrayResource(String name, Class elemType, int length)\r
+           static public Object deserializeArrayResource(String name, int length)\r
                throws IOException\r
        {               \r
                InputStream str = getResourceAsStream(name);\r
                if (str==null)\r
                        throw new IOException("unable to load resource '"+name+"'");\r
                \r
-               Object obj = deserializeArray(str, elemType, length);\r
+//             Object obj = deserializeArray(str, elemType, length);\r
+               Object obj = deserializeArray(str, length);\r
                \r
                return obj;\r
        }       \r
@@ -153,14 +171,15 @@ public class JavaLayerUtils
        static public void serialize(OutputStream out, Object obj)\r
                throws IOException\r
        {\r
-               if (out==null)\r
-                       throw new NullPointerException("out");\r
-               \r
-               if (obj==null)\r
-                       throw new NullPointerException("obj");\r
-               \r
-               ObjectOutputStream objOut = new ObjectOutputStream(out);\r
-               objOut.writeObject(obj);\r
+       //TODO : need to enable after having objectinputstream\r
+//             if (out==null)\r
+//                     throw new NullPointerException("out");\r
+//             \r
+//             if (obj==null)\r
+//                     throw new NullPointerException("obj");\r
+//             \r
+//             ObjectOutputStream objOut = new ObjectOutputStream(out);\r
+//             objOut.writeObject(obj);\r
                                \r
        }\r
 \r
@@ -196,11 +215,12 @@ public class JavaLayerUtils
                {\r
                        is = hook.getResourceAsStream(name);    \r
                }\r
-               else\r
-               {\r
-                       Class cls = JavaLayerUtils.class;\r
-                       is = cls.getResourceAsStream(name);\r
-               }\r
+               //TODO java reflection\r
+//             else\r
+//             {\r
+//                     Class cls = JavaLayerUtils.class;\r
+//                     is = cls.getResourceAsStream(name);\r
+//             }\r
                \r
                return is;              \r
        }\r
index 42ea4c7..0ac6afa 100644 (file)
@@ -701,7 +701,8 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
                        @LOC("TMP") int tmp = 0;
                        @LOC("TEMP") int temp = samplecode;
                        
-                       if(temp > source.length - 3) temp = source.length - 3;
+//                     if(temp > source.length - 3) temp = source.length - 3;
+                       if(temp > groupingtable[0].length - 3) temp = groupingtable[0].length - 3;
                        
                        samples[tmp] = groupingtable[0][temp];
                        temp++;tmp++;
index c271208..a65f2ef 100644 (file)
@@ -62,7 +62,7 @@ final class LayerIIIDecoder implements FrameDecoder {
   @LOC("VAR") private float[][] prevblck;
   @LOC("K") private float[][] k;
   @LOC("NZ") private int[] nonzero;
-  @LOC("F")private Bitstream stream;
+  @LOC("F") private Bitstream stream;
   @LOC("H") private Header header;
   @LOC("F") private SynthesisFilter filter1;
   @LOC("F") private SynthesisFilter filter2;
@@ -90,7 +90,8 @@ final class LayerIIIDecoder implements FrameDecoder {
   // decodeFrame() method, where possible, so that one
   @LATTICE("THIS<VAR,THIS<I,THIS<J,J<CH,I*,J*,CH*,THISLOC=THIS,GLOBALLOC=THIS") 
   public LayerIIIDecoder(@LOC("VAR") Bitstream stream0, @LOC("VAR") Header header0, @LOC("VAR") SynthesisFilter filtera,
-                       SynthesisFilter @LOC("VAR") filterb, @LOC("VAR") Obuffer buffer0, @LOC("VAR") int which_ch0) {
+      @LOC("VAR") SynthesisFilter filterb, @LOC("VAR") Obuffer buffer0, @LOC("VAR") int which_ch0) {
+    
     huffcodetab.inithuff();
     is_1d = new int[SBLIMIT * SSLIMIT + 4];
     ro = new float[2][SBLIMIT][SSLIMIT];
@@ -1498,70 +1499,70 @@ final class LayerIIIDecoder implements FrameDecoder {
   @LOC("TS") float[] tsOutCopy = new float[18];
   @LOC("RAW") float[] rawout = new float[36];
   
-@LATTICE("THIS<SB,THIS<SH,SH<IN,IN<GLOBAL,SB*,SH*,THISLOC=THIS,GLOBALLOC=GLOBAL")
-    private void hybrid(@LOC("IN") int ch, @LOC("IN") int gr) {
-    @LOC("THIS,LayerIIIDecoder.BT") int bt;
-    @LOC("SB") int sb18;
-    @LOC("THIS,LayerIIIDecoder.GR") gr_info_s gr_info = (si.ch[ch].gr[gr]);
-    @LOC("THIS,LayerIIIDecoder.TS") float[] tsOut;
-
-    //float[][] prvblk;
-
-    for (sb18 = 0; sb18 < 576; sb18 += 18) {
-      bt =
-          ((gr_info.window_switching_flag != 0) && (gr_info.mixed_block_flag != 0) && (sb18 < 36))
-              ? 0 : gr_info.block_type;
-
-      tsOut = out_1d;
-      // Modif E.B 02/22/99
-      for (@LOC("SH") int cc = 0; cc < 18; cc++)
-        tsOutCopy[cc] = tsOut[cc + sb18];
-
-      inv_mdct(tsOutCopy, rawout, bt);
-
-      for (@LOC("SH") int cc = 0; cc < 18; cc++)
-        tsOut[cc + sb18] = tsOutCopy[cc];
-      // Fin Modif
-
-      // overlap addition
-      //prvblk = prevblck; //eliminated unnecessary areas
-
-      tsOut[0 + sb18] = rawout[0] + prevblk[ch][sb18 + 0];
-      prevblk[ch][sb18 + 0] = rawout[18];
-      tsOut[1 + sb18] = rawout[1] + prevblk[ch][sb18 + 1];
-      prevblk[ch][sb18 + 1] = rawout[19];
-      tsOut[2 + sb18] = rawout[2] + prevblk[ch][sb18 + 2];
-      prevblk[ch][sb18 + 2] = rawout[20];
-      tsOut[3 + sb18] = rawout[3] + prevblk[ch][sb18 + 3];
-      prevblk[ch][sb18 + 3] = rawout[21];
-      tsOut[4 + sb18] = rawout[4] + prevblk[ch][sb18 + 4];
-      prevblk[ch][sb18 + 4] = rawout[22];
-      tsOut[5 + sb18] = rawout[5] + prevblk[ch][sb18 + 5];
-      prevblk[ch][sb18 + 5] = rawout[23];
-      tsOut[6 + sb18] = rawout[6] + prevblk[ch][sb18 + 6];
-      prevblk[ch][sb18 + 6] = rawout[24];
-      tsOut[7 + sb18] = rawout[7] + prevblk[ch][sb18 + 7];
-      prevblk[ch][sb18 + 7] = rawout[25];
-      tsOut[8 + sb18] = rawout[8] + prevblk[ch][sb18 + 8];
-      prevblk[ch][sb18 + 8] = rawout[26];
-      tsOut[9 + sb18] = rawout[9] + prevblk[ch][sb18 + 9];
-      prevblk[ch][sb18 + 9] = rawout[27];
-      tsOut[10 + sb18] = rawout[10] + prevblk[ch][sb18 + 10];
-      prevblk[ch][sb18 + 10] = rawout[28];
-      tsOut[11 + sb18] = rawout[11] + prevblk[ch][sb18 + 11];
-      prevblk[ch][sb18 + 11] = rawout[29];
-      tsOut[12 + sb18] = rawout[12] + prevblk[ch][sb18 + 12];
-      prevblk[ch][sb18 + 12] = rawout[30];
-      tsOut[13 + sb18] = rawout[13] + prevblk[ch][sb18 + 13];
-      prevblk[ch][sb18 + 13] = rawout[31];
-      tsOut[14 + sb18] = rawout[14] + prevblk[ch][sb18 + 14];
-      prevblk[ch][sb18 + 14] = rawout[32];
-      tsOut[15 + sb18] = rawout[15] + prevblk[ch][sb18 + 15];
-      prevblk[ch][sb18 + 15] = rawout[33];
-      tsOut[16 + sb18] = rawout[16] + prevblk[ch][sb18 + 16];
-      prevblk[ch][sb18 + 16] = rawout[34];
-      tsOut[17 + sb18] = rawout[17] + prevblk[ch][sb18 + 17];
-      prevblk[ch][sb18 + 17] = rawout[35];
+  @LATTICE("THIS<SB,THIS<SH,SH<IN,IN<GLOBAL,SB*,SH*,THISLOC=THIS,GLOBALLOC=GLOBAL")
+  private void hybrid(@LOC("IN") int ch, @LOC("IN") int gr) {
+  @LOC("THIS,LayerIIIDecoder.BT") int bt;
+  @LOC("SB") int sb18;
+  @LOC("THIS,LayerIIIDecoder.GR") gr_info_s gr_info = (si.ch[ch].gr[gr]);
+  @LOC("THIS,LayerIIIDecoder.TS") float[] tsOut;
+
+  //float[][] prvblk;
+
+  for (sb18 = 0; sb18 < 576; sb18 += 18) {
+    bt =
+        ((gr_info.window_switching_flag != 0) && (gr_info.mixed_block_flag != 0) && (sb18 < 36))
+            ? 0 : gr_info.block_type;
+
+    tsOut = out_1d;
+    // Modif E.B 02/22/99
+    for (@LOC("SH") int cc = 0; cc < 18; cc++)
+      tsOutCopy[cc] = tsOut[cc + sb18];
+
+    inv_mdct(tsOutCopy, rawout, bt);
+
+    for (@LOC("SH") int cc = 0; cc < 18; cc++)
+      tsOut[cc + sb18] = tsOutCopy[cc];
+    // Fin Modif
+
+    // overlap addition
+    //prvblk = prevblck; //eliminated unnecessary areas
+
+    tsOut[0 + sb18] = rawout[0] + prevblck[ch][sb18 + 0];
+    prevblck[ch][sb18 + 0] = rawout[18];
+    tsOut[1 + sb18] = rawout[1] + prevblck[ch][sb18 + 1];
+    prevblck[ch][sb18 + 1] = rawout[19];
+    tsOut[2 + sb18] = rawout[2] + prevblck[ch][sb18 + 2];
+    prevblck[ch][sb18 + 2] = rawout[20];
+    tsOut[3 + sb18] = rawout[3] + prevblck[ch][sb18 + 3];
+    prevblck[ch][sb18 + 3] = rawout[21];
+    tsOut[4 + sb18] = rawout[4] + prevblck[ch][sb18 + 4];
+    prevblck[ch][sb18 + 4] = rawout[22];
+    tsOut[5 + sb18] = rawout[5] + prevblck[ch][sb18 + 5];
+    prevblck[ch][sb18 + 5] = rawout[23];
+    tsOut[6 + sb18] = rawout[6] + prevblck[ch][sb18 + 6];
+    prevblck[ch][sb18 + 6] = rawout[24];
+    tsOut[7 + sb18] = rawout[7] + prevblck[ch][sb18 + 7];
+    prevblck[ch][sb18 + 7] = rawout[25];
+    tsOut[8 + sb18] = rawout[8] + prevblck[ch][sb18 + 8];
+    prevblck[ch][sb18 + 8] = rawout[26];
+    tsOut[9 + sb18] = rawout[9] + prevblck[ch][sb18 + 9];
+    prevblck[ch][sb18 + 9] = rawout[27];
+    tsOut[10 + sb18] = rawout[10] + prevblck[ch][sb18 + 10];
+    prevblck[ch][sb18 + 10] = rawout[28];
+    tsOut[11 + sb18] = rawout[11] + prevblck[ch][sb18 + 11];
+    prevblck[ch][sb18 + 11] = rawout[29];
+    tsOut[12 + sb18] = rawout[12] + prevblck[ch][sb18 + 12];
+    prevblck[ch][sb18 + 12] = rawout[30];
+    tsOut[13 + sb18] = rawout[13] + prevblck[ch][sb18 + 13];
+    prevblck[ch][sb18 + 13] = rawout[31];
+    tsOut[14 + sb18] = rawout[14] + prevblck[ch][sb18 + 14];
+    prevblck[ch][sb18 + 14] = rawout[32];
+    tsOut[15 + sb18] = rawout[15] + prevblck[ch][sb18 + 15];
+    prevblck[ch][sb18 + 15] = rawout[33];
+    tsOut[16 + sb18] = rawout[16] + prevblck[ch][sb18 + 16];
+    prevblck[ch][sb18 + 16] = rawout[34];
+    tsOut[17 + sb18] = rawout[17] + prevblck[ch][sb18 + 17];
+    prevblck[ch][sb18 + 17] = rawout[35];
     }
   }
 
index 3acb03c..3bc1cc9 100644 (file)
@@ -248,6 +248,10 @@ public class Player
 */             \r
                return true;\r
        }\r
+       \r
+       public static void main(String args[]){\r
+         //dummy         \r
+       }\r
 \r
        \r
 }\r
index f90c8d5..d38baf3 100644 (file)
@@ -935,22 +935,22 @@ final class SynthesisFilter
                {\r
                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
                //final float[] dp = d16[i]; //subbed in variable name instead to reduce areas\r
-               pcm_sample = (float)(((actual_v[0 + dvp] * d16[0]) +\r
-                       (actual_v[15 + dvp] * d16[1]) +\r
-                       (actual_v[14 + dvp] * d16[2]) +\r
-                       (actual_v[13 + dvp] * d16[3]) +\r
-                       (actual_v[12 + dvp] * d16[4]) +\r
-                       (actual_v[11 + dvp] * d16[5]) +\r
-                       (actual_v[10 + dvp] * d16[6]) +\r
-                       (actual_v[9 + dvp] * d16[7]) +\r
-                       (actual_v[8 + dvp] * d16[8]) +\r
-                       (actual_v[7 + dvp] * d16[9]) +\r
-                       (actual_v[6 + dvp] * d16[10]) +\r
-                       (actual_v[5 + dvp] * d16[11]) +\r
-                       (actual_v[4 + dvp] * d16[12]) +\r
-                       (actual_v[3 + dvp] * d16[13]) +\r
-                       (actual_v[2 + dvp] * d16[14]) +\r
-                       (actual_v[1 + dvp] * d16[15])\r
+               pcm_sample = (float)(((actual_v[0 + dvp] * d16[i][0]) +\r
+                       (actual_v[15 + dvp] * d16[i][1]) +\r
+                       (actual_v[14 + dvp] * d16[i][2]) +\r
+                       (actual_v[13 + dvp] * d16[i][3]) +\r
+                       (actual_v[12 + dvp] * d16[i][4]) +\r
+                       (actual_v[11 + dvp] * d16[i][5]) +\r
+                       (actual_v[10 + dvp] * d16[i][6]) +\r
+                       (actual_v[9 + dvp] * d16[i][7]) +\r
+                       (actual_v[8 + dvp] * d16[i][8]) +\r
+                       (actual_v[7 + dvp] * d16[i][9]) +\r
+                       (actual_v[6 + dvp] * d16[i][10]) +\r
+                       (actual_v[5 + dvp] * d16[i][11]) +\r
+                       (actual_v[4 + dvp] * d16[i][12]) +\r
+                       (actual_v[3 + dvp] * d16[i][13]) +\r
+                       (actual_v[2 + dvp] * d16[i][14]) +\r
+                       (actual_v[1 + dvp] * d16[i][15])\r
                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;\r
@@ -972,22 +972,22 @@ final class SynthesisFilter
                            //final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float)(((actual_v[1 + dvp] * d16[0]) +\r
-                                                     (actual_v[0 + dvp] * d16[1]) +\r
-                                       (actual_v[15 + dvp] * d16[2]) +\r
-                                       (actual_v[14 + dvp] * d16[3]) +\r
-                                       (actual_v[13 + dvp] * d16[4]) +\r
-                                       (actual_v[12 + dvp] * d16[5]) +\r
-                                       (actual_v[11 + dvp] * d16[6]) +\r
-                                       (actual_v[10 + dvp] * d16[7]) +\r
-                                       (actual_v[9 + dvp] * d16[8]) +\r
-                                       (actual_v[8 + dvp] * d16[9]) +\r
-                                       (actual_v[7 + dvp] * d16[10]) +\r
-                                       (actual_v[6 + dvp] * d16[11]) +\r
-                                       (actual_v[5 + dvp] * d16[12]) +\r
-                                       (actual_v[4 + dvp] * d16[13]) +\r
-                                       (actual_v[3 + dvp] * d16[14]) +\r
-                                       (actual_v[2 + dvp] * d16[15])\r
+                               pcm_sample = (float)(((actual_v[1 + dvp] * d16[i][0]) +\r
+                                                     (actual_v[0 + dvp] * d16[i][1]) +\r
+                                       (actual_v[15 + dvp] * d16[i][2]) +\r
+                                       (actual_v[14 + dvp] * d16[i][3]) +\r
+                                       (actual_v[13 + dvp] * d16[i][4]) +\r
+                                       (actual_v[12 + dvp] * d16[i][5]) +\r
+                                       (actual_v[11 + dvp] * d16[i][6]) +\r
+                                       (actual_v[10 + dvp] * d16[i][7]) +\r
+                                       (actual_v[9 + dvp] * d16[i][8]) +\r
+                                       (actual_v[8 + dvp] * d16[i][9]) +\r
+                                       (actual_v[7 + dvp] * d16[i][10]) +\r
+                                       (actual_v[6 + dvp] * d16[i][11]) +\r
+                                       (actual_v[5 + dvp] * d16[i][12]) +\r
+                                       (actual_v[4 + dvp] * d16[i][13]) +\r
+                                       (actual_v[3 + dvp] * d16[i][14]) +\r
+                                       (actual_v[2 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;\r
@@ -1010,22 +1010,22 @@ final class SynthesisFilter
                            //final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float)(((actual_v[2 + dvp] * d16[0]) +\r
-                                       (actual_v[1 + dvp] * d16[1]) +\r
-                                       (actual_v[0 + dvp] * d16[2]) +\r
-                                       (actual_v[15 + dvp] * d16[3]) +\r
-                                       (actual_v[14 + dvp] * d16[4]) +\r
-                                       (actual_v[13 + dvp] * d16[5]) +\r
-                                       (actual_v[12 + dvp] * d16[6]) +\r
-                                       (actual_v[11 + dvp] * d16[7]) +\r
-                                       (actual_v[10 + dvp] * d16[8]) +\r
-                                       (actual_v[9 + dvp] * d16[9]) +\r
-                                       (actual_v[8 + dvp] * d16[10]) +\r
-                                       (actual_v[7 + dvp] * d16[11]) +\r
-                                       (actual_v[6 + dvp] * d16[12]) +\r
-                                       (actual_v[5 + dvp] * d16[13]) +\r
-                                       (actual_v[4 + dvp] * d16[14]) +\r
-                                       (actual_v[3 + dvp] * d16[15])\r
+                               pcm_sample = (float)(((actual_v[2 + dvp] * d16[i][0]) +\r
+                                       (actual_v[1 + dvp] * d16[i][1]) +\r
+                                       (actual_v[0 + dvp] * d16[i][2]) +\r
+                                       (actual_v[15 + dvp] * d16[i][3]) +\r
+                                       (actual_v[14 + dvp] * d16[i][4]) +\r
+                                       (actual_v[13 + dvp] * d16[i][5]) +\r
+                                       (actual_v[12 + dvp] * d16[i][6]) +\r
+                                       (actual_v[11 + dvp] * d16[i][7]) +\r
+                                       (actual_v[10 + dvp] * d16[i][8]) +\r
+                                       (actual_v[9 + dvp] * d16[i][9]) +\r
+                                       (actual_v[8 + dvp] * d16[i][10]) +\r
+                                       (actual_v[7 + dvp] * d16[i][11]) +\r
+                                       (actual_v[6 + dvp] * d16[i][12]) +\r
+                                       (actual_v[5 + dvp] * d16[i][13]) +\r
+                                       (actual_v[4 + dvp] * d16[i][14]) +\r
+                                       (actual_v[3 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;\r
@@ -1049,22 +1049,22 @@ final class SynthesisFilter
                            //final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float) ( ( (actual_v[3 + dvp] * d16[0]) +\r
-                                       (actual_v[2 + dvp] * d16[1]) +\r
-                                       (actual_v[1 + dvp] * d16[2]) +\r
-                                       (actual_v[0 + dvp] * d16[3]) +\r
-                                       (actual_v[15 + dvp] * d16[4]) +\r
-                                       (actual_v[14 + dvp] * d16[5]) +\r
-                                       (actual_v[13 + dvp] * d16[6]) +\r
-                                       (actual_v[12 + dvp] * d16[7]) +\r
-                                       (actual_v[11 + dvp] * d16[8]) +\r
-                                       (actual_v[10 + dvp] * d16[9]) +\r
-                                       (actual_v[9 + dvp] * d16[10]) +\r
-                                       (actual_v[8 + dvp] * d16[11]) +\r
-                                       (actual_v[7 + dvp] * d16[12]) +\r
-                                       (actual_v[6 + dvp] * d16[13]) +\r
-                                       (actual_v[5 + dvp] * d16[14]) +\r
-                                       (actual_v[4 + dvp] * d16[15])\r
+                               pcm_sample = (float) ( ( (actual_v[3 + dvp] * d16[i][0]) +\r
+                                       (actual_v[2 + dvp] * d16[i][1]) +\r
+                                       (actual_v[1 + dvp] * d16[i][2]) +\r
+                                       (actual_v[0 + dvp] * d16[i][3]) +\r
+                                       (actual_v[15 + dvp] * d16[i][4]) +\r
+                                       (actual_v[14 + dvp] * d16[i][5]) +\r
+                                       (actual_v[13 + dvp] * d16[i][6]) +\r
+                                       (actual_v[12 + dvp] * d16[i][7]) +\r
+                                       (actual_v[11 + dvp] * d16[i][8]) +\r
+                                       (actual_v[10 + dvp] * d16[i][9]) +\r
+                                       (actual_v[9 + dvp] * d16[i][10]) +\r
+                                       (actual_v[8 + dvp] * d16[i][11]) +\r
+                                       (actual_v[7 + dvp] * d16[i][12]) +\r
+                                       (actual_v[6 + dvp] * d16[i][13]) +\r
+                                       (actual_v[5 + dvp] * d16[i][14]) +\r
+                                       (actual_v[4 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;\r
@@ -1087,22 +1087,22 @@ final class SynthesisFilter
                            //final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float)(((actual_v[4 + dvp] * d16[0]) +\r
-                                       (actual_v[3 + dvp] * d16[1]) +\r
-                                       (actual_v[2 + dvp] * d16[2]) +\r
-                                       (actual_v[1 + dvp] * d16[3]) +\r
-                                       (actual_v[0 + dvp] * d16[4]) +\r
-                                       (actual_v[15 + dvp] * d16[5]) +\r
-                                       (actual_v[14 + dvp] * d16[6]) +\r
-                                       (actual_v[13 + dvp] * d16[7]) +\r
-                                       (actual_v[12 + dvp] * d16[8]) +\r
-                                       (actual_v[11 + dvp] * d16[9]) +\r
-                                       (actual_v[10 + dvp] * d16[10]) +\r
-                                       (actual_v[9 + dvp] * d16[11]) +\r
-                                       (actual_v[8 + dvp] * d16[12]) +\r
-                                       (actual_v[7 + dvp] * d16[13]) +\r
-                                       (actual_v[6 + dvp] * d16[14]) +\r
-                                       (actual_v[5 + dvp] * d16[15])\r
+                               pcm_sample = (float)(((actual_v[4 + dvp] * d16[i][0]) +\r
+                                       (actual_v[3 + dvp] * d16[i][1]) +\r
+                                       (actual_v[2 + dvp] * d16[i][2]) +\r
+                                       (actual_v[1 + dvp] * d16[i][3]) +\r
+                                       (actual_v[0 + dvp] * d16[i][4]) +\r
+                                       (actual_v[15 + dvp] * d16[i][5]) +\r
+                                       (actual_v[14 + dvp] * d16[i][6]) +\r
+                                       (actual_v[13 + dvp] * d16[i][7]) +\r
+                                       (actual_v[12 + dvp] * d16[i][8]) +\r
+                                       (actual_v[11 + dvp] * d16[i][9]) +\r
+                                       (actual_v[10 + dvp] * d16[i][10]) +\r
+                                       (actual_v[9 + dvp] * d16[i][11]) +\r
+                                       (actual_v[8 + dvp] * d16[i][12]) +\r
+                                       (actual_v[7 + dvp] * d16[i][13]) +\r
+                                       (actual_v[6 + dvp] * d16[i][14]) +\r
+                                       (actual_v[5 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;\r
@@ -1125,22 +1125,22 @@ final class SynthesisFilter
                            //  final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float)(((actual_v[5 + dvp] * d16[0]) +\r
-                                       (actual_v[4 + dvp] * d16[1]) +\r
-                                       (actual_v[3 + dvp] * d16[2]) +\r
-                                       (actual_v[2 + dvp] * d16[3]) +\r
-                                       (actual_v[1 + dvp] * d16[4]) +\r
-                                       (actual_v[0 + dvp] * d16[5]) +\r
-                                       (actual_v[15 + dvp] * d16[6]) +\r
-                                       (actual_v[14 + dvp] * d16[7]) +\r
-                                       (actual_v[13 + dvp] * d16[8]) +\r
-                                       (actual_v[12 + dvp] * d16[9]) +\r
-                                       (actual_v[11 + dvp] * d16[10]) +\r
-                                       (actual_v[10 + dvp] * d16[11]) +\r
-                                       (actual_v[9 + dvp] * d16[12]) +\r
-                                       (actual_v[8 + dvp] * d16[13]) +\r
-                                       (actual_v[7 + dvp] * d16[14]) +\r
-                                       (actual_v[6 + dvp] * d16[15])\r
+                               pcm_sample = (float)(((actual_v[5 + dvp] * d16[i][0]) +\r
+                                       (actual_v[4 + dvp] * d16[i][1]) +\r
+                                       (actual_v[3 + dvp] * d16[i][2]) +\r
+                                       (actual_v[2 + dvp] * d16[i][3]) +\r
+                                       (actual_v[1 + dvp] * d16[i][4]) +\r
+                                       (actual_v[0 + dvp] * d16[i][5]) +\r
+                                       (actual_v[15 + dvp] * d16[i][6]) +\r
+                                       (actual_v[14 + dvp] * d16[i][7]) +\r
+                                       (actual_v[13 + dvp] * d16[i][8]) +\r
+                                       (actual_v[12 + dvp] * d16[i][9]) +\r
+                                       (actual_v[11 + dvp] * d16[i][10]) +\r
+                                       (actual_v[10 + dvp] * d16[i][11]) +\r
+                                       (actual_v[9 + dvp] * d16[i][12]) +\r
+                                       (actual_v[8 + dvp] * d16[i][13]) +\r
+                                       (actual_v[7 + dvp] * d16[i][14]) +\r
+                                       (actual_v[6 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;\r
@@ -1162,22 +1162,22 @@ final class SynthesisFilter
                            //final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float)(((actual_v[6 + dvp] * d16[0]) +\r
-                                       (actual_v[5 + dvp] * d61[1]) +\r
-                                       (actual_v[4 + dvp] * d16[2]) +\r
-                                       (actual_v[3 + dvp] * d16[3]) +\r
-                                       (actual_v[2 + dvp] * d16[4]) +\r
-                                       (actual_v[1 + dvp] * d16[5]) +\r
-                                       (actual_v[0 + dvp] * d16[6]) +\r
-                                       (actual_v[15 + dvp] * d16[7]) +\r
-                                       (actual_v[14 + dvp] * d16[8]) +\r
-                                       (actual_v[13 + dvp] * d16[9]) +\r
-                                       (actual_v[12 + dvp] * d16[10]) +\r
-                                       (actual_v[11 + dvp] * d16[11]) +\r
-                                       (actual_v[10 + dvp] * d16[12]) +\r
-                                       (actual_v[9 + dvp] * d16[13]) +\r
-                                       (actual_v[8 + dvp] * d16[14]) +\r
-                                       (actual_v[7 + dvp] * d16[15])\r
+                               pcm_sample = (float)(((actual_v[6 + dvp] * d16[i][0]) +\r
+                                       (actual_v[5 + dvp] * d16[i][1]) +\r
+                                       (actual_v[4 + dvp] * d16[i][2]) +\r
+                                       (actual_v[3 + dvp] * d16[i][3]) +\r
+                                       (actual_v[2 + dvp] * d16[i][4]) +\r
+                                       (actual_v[1 + dvp] * d16[i][5]) +\r
+                                       (actual_v[0 + dvp] * d16[i][6]) +\r
+                                       (actual_v[15 + dvp] * d16[i][7]) +\r
+                                       (actual_v[14 + dvp] * d16[i][8]) +\r
+                                       (actual_v[13 + dvp] * d16[i][9]) +\r
+                                       (actual_v[12 + dvp] * d16[i][10]) +\r
+                                       (actual_v[11 + dvp] * d16[i][11]) +\r
+                                       (actual_v[10 + dvp] * d16[i][12]) +\r
+                                       (actual_v[9 + dvp] * d16[i][13]) +\r
+                                       (actual_v[8 + dvp] * d16[i][14]) +\r
+                                       (actual_v[7 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;\r
@@ -1200,22 +1200,22 @@ final class SynthesisFilter
                            //final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float)(((actual_v[7 + dvp] * d16[0]) +\r
-                                       (actual_v[6 + dvp] * d16[1]) +\r
-                                       (actual_v[5 + dvp] * d16[2]) +\r
-                                       (actual_v[4 + dvp] * d16[3]) +\r
-                                       (actual_v[3 + dvp] * d16[4]) +\r
-                                       (actual_v[2 + dvp] * d16[5]) +\r
-                                       (actual_v[1 + dvp] * d16[6]) +\r
-                                       (actual_v[0 + dvp] * d16[7]) +\r
-                                       (actual_v[15 + dvp] * d16[8]) +\r
-                                       (actual_v[14 + dvp] * d16[9]) +\r
-                                       (actual_v[13 + dvp] * d16[10]) +\r
-                                       (actual_v[12 + dvp] * d16[11]) +\r
-                                       (actual_v[11 + dvp] * d16[12]) +\r
-                                       (actual_v[10 + dvp] * d16[13]) +\r
-                                       (actual_v[9 + dvp] * d16[14]) +\r
-                                       (actual_v[8 + dvp] * d16[15])\r
+                               pcm_sample = (float)(((actual_v[7 + dvp] * d16[i][0]) +\r
+                                       (actual_v[6 + dvp] * d16[i][1]) +\r
+                                       (actual_v[5 + dvp] * d16[i][2]) +\r
+                                       (actual_v[4 + dvp] * d16[i][3]) +\r
+                                       (actual_v[3 + dvp] * d16[i][4]) +\r
+                                       (actual_v[2 + dvp] * d16[i][5]) +\r
+                                       (actual_v[1 + dvp] * d16[i][6]) +\r
+                                       (actual_v[0 + dvp] * d16[i][7]) +\r
+                                       (actual_v[15 + dvp] * d16[i][8]) +\r
+                                       (actual_v[14 + dvp] * d16[i][9]) +\r
+                                       (actual_v[13 + dvp] * d16[i][10]) +\r
+                                       (actual_v[12 + dvp] * d16[i][11]) +\r
+                                       (actual_v[11 + dvp] * d16[i][12]) +\r
+                                       (actual_v[10 + dvp] * d16[i][13]) +\r
+                                       (actual_v[9 + dvp] * d16[i][14]) +\r
+                                       (actual_v[8 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;\r
@@ -1238,22 +1238,22 @@ final class SynthesisFilter
                            //final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float)(((actual_v[8 + dvp] * d16[0]) +\r
-                                       (actual_v[7 + dvp] * d16[1]) +\r
-                                       (actual_v[6 + dvp] * d16[2]) +\r
-                                       (actual_v[5 + dvp] * d16[3]) +\r
-                                       (actual_v[4 + dvp] * d16[4]) +\r
-                                       (actual_v[3 + dvp] * d16[5]) +\r
-                                       (actual_v[2 + dvp] * d16[6]) +\r
-                                       (actual_v[1 + dvp] * d16[7]) +\r
-                                       (actual_v[0 + dvp] * d16[8]) +\r
-                                       (actual_v[15 + dvp] * d16[9]) +\r
-                                       (actual_v[14 + dvp] * d16[10]) +\r
-                                       (actual_v[13 + dvp] * d16[11]) +\r
-                                       (actual_v[12 + dvp] * d16[12]) +\r
-                                       (actual_v[11 + dvp] * d16[13]) +\r
-                                       (actual_v[10 + dvp] * d16[14]) +\r
-                                       (actual_v[9 + dvp] * d16[15])\r
+                               pcm_sample = (float)(((actual_v[8 + dvp] * d16[i][0]) +\r
+                                       (actual_v[7 + dvp] * d16[i][1]) +\r
+                                       (actual_v[6 + dvp] * d16[i][2]) +\r
+                                       (actual_v[5 + dvp] * d16[i][3]) +\r
+                                       (actual_v[4 + dvp] * d16[i][4]) +\r
+                                       (actual_v[3 + dvp] * d16[i][5]) +\r
+                                       (actual_v[2 + dvp] * d16[i][6]) +\r
+                                       (actual_v[1 + dvp] * d16[i][7]) +\r
+                                       (actual_v[0 + dvp] * d16[i][8]) +\r
+                                       (actual_v[15 + dvp] * d16[i][9]) +\r
+                                       (actual_v[14 + dvp] * d16[i][10]) +\r
+                                       (actual_v[13 + dvp] * d16[i][11]) +\r
+                                       (actual_v[12 + dvp] * d16[i][12]) +\r
+                                       (actual_v[11 + dvp] * d16[i][13]) +\r
+                                       (actual_v[10 + dvp] * d16[i][14]) +\r
+                                       (actual_v[9 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;\r
@@ -1276,22 +1276,22 @@ final class SynthesisFilter
                            //final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float)(((actual_v[9 + dvp] * d16[0]) +\r
-                                       (actual_v[8 + dvp] * d16[1]) +\r
-                                       (actual_v[7 + dvp] * d16[2]) +\r
-                                       (actual_v[6 + dvp] * d16[3]) +\r
-                                       (actual_v[5 + dvp] * d16[4]) +\r
-                                       (actual_v[4 + dvp] * d16[5]) +\r
-                                       (actual_v[3 + dvp] * d16[6]) +\r
-                                       (actual_v[2 + dvp] * d16[7]) +\r
-                                       (actual_v[1 + dvp] * d16[8]) +\r
-                                       (actual_v[0 + dvp] * d16[9]) +\r
-                                       (actual_v[15 + dvp] * d16[10]) +\r
-                                       (actual_v[14 + dvp] * d16[11]) +\r
-                                       (actual_v[13 + dvp] * d16[12]) +\r
-                                       (actual_v[12 + dvp] * d16[13]) +\r
-                                       (actual_v[11 + dvp] * d16[14]) +\r
-                                       (actual_v[10 + dvp] * d16[15])\r
+                               pcm_sample = (float)(((actual_v[9 + dvp] * d16[i][0]) +\r
+                                       (actual_v[8 + dvp] * d16[i][1]) +\r
+                                       (actual_v[7 + dvp] * d16[i][2]) +\r
+                                       (actual_v[6 + dvp] * d16[i][3]) +\r
+                                       (actual_v[5 + dvp] * d16[i][4]) +\r
+                                       (actual_v[4 + dvp] * d16[i][5]) +\r
+                                       (actual_v[3 + dvp] * d16[i][6]) +\r
+                                       (actual_v[2 + dvp] * d16[i][7]) +\r
+                                       (actual_v[1 + dvp] * d16[i][8]) +\r
+                                       (actual_v[0 + dvp] * d16[i][9]) +\r
+                                       (actual_v[15 + dvp] * d16[i][10]) +\r
+                                       (actual_v[14 + dvp] * d16[i][11]) +\r
+                                       (actual_v[13 + dvp] * d16[i][12]) +\r
+                                       (actual_v[12 + dvp] * d16[i][13]) +\r
+                                       (actual_v[11 + dvp] * d16[i][14]) +\r
+                                       (actual_v[10 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;\r
@@ -1313,25 +1313,25 @@ final class SynthesisFilter
                            //final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float)(((vp[10 + dvp] * dp[0]) +\r
-                                       (vp[9 + dvp] * dp[1]) +\r
-                                       (vp[8 + dvp] * dp[2]) +\r
-                                       (vp[7 + dvp] * dp[3]) +\r
-                                       (vp[6 + dvp] * dp[4]) +\r
-                                       (vp[5 + dvp] * dp[5]) +\r
-                                       (vp[4 + dvp] * dp[6]) +\r
-                                       (vp[3 + dvp] * dp[7]) +\r
-                                       (vp[2 + dvp] * dp[8]) +\r
-                                       (vp[1 + dvp] * dp[9]) +\r
-                                       (vp[0 + dvp] * dp[10]) +\r
-                                       (vp[15 + dvp] * dp[11]) +\r
-                                       (vp[14 + dvp] * dp[12]) +\r
-                                       (vp[13 + dvp] * dp[13]) +\r
-                                       (vp[12 + dvp] * dp[14]) +\r
-                                       (vp[11 + dvp] * dp[15])\r
+                               pcm_sample = (float)(((actual_v[10 + dvp] * d16[i][0]) +\r
+                                       (actual_v[9 + dvp] * d16[i][1]) +\r
+                                       (actual_v[8 + dvp] * d16[i][2]) +\r
+                                       (actual_v[7 + dvp] * d16[i][3]) +\r
+                                       (actual_v[6 + dvp] * d16[i][4]) +\r
+                                       (actual_v[5 + dvp] * d16[i][5]) +\r
+                                       (actual_v[4 + dvp] * d16[i][6]) +\r
+                                       (actual_v[3 + dvp] * d16[i][7]) +\r
+                                       (actual_v[2 + dvp] * d16[i][8]) +\r
+                                       (actual_v[1 + dvp] * d16[i][9]) +\r
+                                       (actual_v[0 + dvp] * d16[i][10]) +\r
+                                       (actual_v[15 + dvp] * d16[i][11]) +\r
+                                       (actual_v[14 + dvp] * d16[i][12]) +\r
+                                       (actual_v[13 + dvp] * d16[i][13]) +\r
+                                       (actual_v[12 + dvp] * d16[i][14]) +\r
+                                       (actual_v[11 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
                        } // for\r
@@ -1351,25 +1351,25 @@ final class SynthesisFilter
                            //final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float)(((actual_v[11 + dvp] * d16[0]) +\r
-                                       (actual_v[10 + dvp] * d16[1]) +\r
-                                       (actual_v[9 + dvp] * d16[2]) +\r
-                                       (actual_v[8 + dvp] * d16[3]) +\r
-                                       (actual_v[7 + dvp] * d16[4]) +\r
-                                       (actual_v[6 + dvp] * d16[5]) +\r
-                                       (actual_v[5 + dvp] * d16[6]) +\r
-                                       (actual_v[4 + dvp] * d16[7]) +\r
-                                       (actual_v[3 + dvp] * d16[8]) +\r
-                                       (actual_v[2 + dvp] * d16[9]) +\r
-                                       (actual_v[1 + dvp] * d16[10]) +\r
-                                       (actual_v[0 + dvp] * d16[11]) +\r
-                                       (actual_v[15 + dvp] * d16[12]) +\r
-                                       (actual_v[14 + dvp] * d16[13]) +\r
-                                       (actual_v[13 + dvp] * d16[14]) +\r
-                                       (actual_v[12 + dvp] * d16[15])\r
+                               pcm_sample = (float)(((actual_v[11 + dvp] * d16[i][0]) +\r
+                                       (actual_v[10 + dvp] * d16[i][1]) +\r
+                                       (actual_v[9 + dvp] * d16[i][2]) +\r
+                                       (actual_v[8 + dvp] * d16[i][3]) +\r
+                                       (actual_v[7 + dvp] * d16[i][4]) +\r
+                                       (actual_v[6 + dvp] * d16[i][5]) +\r
+                                       (actual_v[5 + dvp] * d16[i][6]) +\r
+                                       (actual_v[4 + dvp] * d16[i][7]) +\r
+                                       (actual_v[3 + dvp] * d16[i][8]) +\r
+                                       (actual_v[2 + dvp] * d16[i][9]) +\r
+                                       (actual_v[1 + dvp] * d16[i][10]) +\r
+                                       (actual_v[0 + dvp] * d16[i][11]) +\r
+                                       (actual_v[15 + dvp] * d16[i][12]) +\r
+                                       (actual_v[14 + dvp] * d16[i][13]) +\r
+                                       (actual_v[13 + dvp] * d16[i][14]) +\r
+                                       (actual_v[12 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
                        } // for\r
@@ -1388,22 +1388,22 @@ final class SynthesisFilter
                            //final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float)(((actual_v[12 + dvp] * d16[0]) +\r
-                                       (actual_v[11 + dvp] * d16[1]) +\r
-                                       (actual_v[10 + dvp] * d16[2]) +\r
-                                       (actual_v[9 + dvp] * d16[3]) +\r
-                                       (actual_v[8 + dvp] * d16[4]) +\r
-                                       (actual_v[7 + dvp] * d16[5]) +\r
-                                       (actual_v[6 + dvp] * d16[6]) +\r
-                                       (actual_v[5 + dvp] * d16[7]) +\r
-                                       (actual_v[4 + dvp] * d16[8]) +\r
-                                       (actual_v[3 + dvp] * d16[9]) +\r
-                                       (actual_v[2 + dvp] * d16[10]) +\r
-                                       (actual_v[1 + dvp] * d16[11]) +\r
-                                       (actual_v[0 + dvp] * d16[12]) +\r
-                                       (actual_v[15 + dvp] * d16[13]) +\r
-                                       (actual_v[14 + dvp] * d16[14]) +\r
-                                       (actual_v[13 + dvp] * d16[15])\r
+                               pcm_sample = (float)(((actual_v[12 + dvp] * d16[i][0]) +\r
+                                       (actual_v[11 + dvp] * d16[i][1]) +\r
+                                       (actual_v[10 + dvp] * d16[i][2]) +\r
+                                       (actual_v[9 + dvp] * d16[i][3]) +\r
+                                       (actual_v[8 + dvp] * d16[i][4]) +\r
+                                       (actual_v[7 + dvp] * d16[i][5]) +\r
+                                       (actual_v[6 + dvp] * d16[i][6]) +\r
+                                       (actual_v[5 + dvp] * d16[i][7]) +\r
+                                       (actual_v[4 + dvp] * d16[i][8]) +\r
+                                       (actual_v[3 + dvp] * d16[i][9]) +\r
+                                       (actual_v[2 + dvp] * d16[i][10]) +\r
+                                       (actual_v[1 + dvp] * d16[i][11]) +\r
+                                       (actual_v[0 + dvp] * d16[i][12]) +\r
+                                       (actual_v[15 + dvp] * d16[i][13]) +\r
+                                       (actual_v[14 + dvp] * d16[i][14]) +\r
+                                       (actual_v[13 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;\r
@@ -1426,22 +1426,22 @@ final class SynthesisFilter
                            //final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float)(((actual_v[13 + dvp] * d16[0]) +\r
-                                       (actual_v[12 + dvp] * d16[1]) +\r
-                                       (actual_v[11 + dvp] * d16[2]) +\r
-                                       (actual_v[10 + dvp] * d16[3]) +\r
-                                       (actual_v[9 + dvp] * d16[4]) +\r
-                                       (actual_v[8 + dvp] * d16[5]) +\r
-                                       (actual_v[7 + dvp] * d16[6]) +\r
-                                       (actual_v[6 + dvp] * d16[7]) +\r
-                                       (actual_v[5 + dvp] * d16[8]) +\r
-                                       (actual_v[4 + dvp] * d16[9]) +\r
-                                       (actual_v[3 + dvp] * d16[10]) +\r
-                                       (actual_v[2 + dvp] * d16[11]) +\r
-                                       (actual_v[1 + dvp] * d16[12]) +\r
-                                       (actual_v[0 + dvp] * d16[13]) +\r
-                                       (actual_v[15 + dvp] * d16[14]) +\r
-                                       (actual_v[14 + dvp] * d16[15])\r
+                               pcm_sample = (float)(((actual_v[13 + dvp] * d16[i][0]) +\r
+                                       (actual_v[12 + dvp] * d16[i][1]) +\r
+                                       (actual_v[11 + dvp] * d16[i][2]) +\r
+                                       (actual_v[10 + dvp] * d16[i][3]) +\r
+                                       (actual_v[9 + dvp] * d16[i][4]) +\r
+                                       (actual_v[8 + dvp] * d16[i][5]) +\r
+                                       (actual_v[7 + dvp] * d16[i][6]) +\r
+                                       (actual_v[6 + dvp] * d16[i][7]) +\r
+                                       (actual_v[5 + dvp] * d16[i][8]) +\r
+                                       (actual_v[4 + dvp] * d16[i][9]) +\r
+                                       (actual_v[3 + dvp] * d16[i][10]) +\r
+                                       (actual_v[2 + dvp] * d16[i][11]) +\r
+                                       (actual_v[1 + dvp] * d16[i][12]) +\r
+                                       (actual_v[0 + dvp] * d16[i][13]) +\r
+                                       (actual_v[15 + dvp] * d16[i][14]) +\r
+                                       (actual_v[14 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;\r
@@ -1464,22 +1464,22 @@ final class SynthesisFilter
                            //final float[] dp = d16[i];\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
-                               pcm_sample = (float)(((actual_v[14 + dvp] * d16[0]) +\r
-                                       (actual_v[13 + dvp] * d16[1]) +\r
-                                       (actual_v[12 + dvp] * d16[2]) +\r
-                                       (actual_v[11 + dvp] * d16[3]) +\r
-                                       (actual_v[10 + dvp] * d16[4]) +\r
-                                       (actual_v[9 + dvp] * d16[5]) +\r
-                                       (actual_v[8 + dvp] * d16[6]) +\r
-                                       (actual_v[7 + dvp] * d16[7]) +\r
-                                       (actual_v[6 + dvp] * d16[8]) +\r
-                                       (actual_v[5 + dvp] * d16[9]) +\r
-                                       (actual_v[4 + dvp] * d16[10]) +\r
-                                       (actual_v[3 + dvp] * d16[11]) +\r
-                                       (actual_v[2 + dvp] * d16[12]) +\r
-                                       (actual_v[1 + dvp] * d16[13]) +\r
-                                       (actual_v[0 + dvp] * d16[14]) +\r
-                                       (actual_v[15 + dvp] * d16[15])\r
+                               pcm_sample = (float)(((actual_v[14 + dvp] * d16[i][0]) +\r
+                                       (actual_v[13 + dvp] * d16[i][1]) +\r
+                                       (actual_v[12 + dvp] * d16[i][2]) +\r
+                                       (actual_v[11 + dvp] * d16[i][3]) +\r
+                                       (actual_v[10 + dvp] * d16[i][4]) +\r
+                                       (actual_v[9 + dvp] * d16[i][5]) +\r
+                                       (actual_v[8 + dvp] * d16[i][6]) +\r
+                                       (actual_v[7 + dvp] * d16[i][7]) +\r
+                                       (actual_v[6 + dvp] * d16[i][8]) +\r
+                                       (actual_v[5 + dvp] * d16[i][9]) +\r
+                                       (actual_v[4 + dvp] * d16[i][10]) +\r
+                                       (actual_v[3 + dvp] * d16[i][11]) +\r
+                                       (actual_v[2 + dvp] * d16[i][12]) +\r
+                                       (actual_v[1 + dvp] * d16[i][13]) +\r
+                                       (actual_v[0 + dvp] * d16[i][14]) +\r
+                                       (actual_v[15 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;\r
@@ -1501,22 +1501,22 @@ final class SynthesisFilter
                        {\r
                                @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
                                //final float dp[] = d16[i];\r
-                               pcm_sample = (float)(((vp[15 + dvp] * d16[0]) +\r
-                                       (actual_v[14 + dvp] * d16[1]) +\r
-                                       (actual_v[13 + dvp] * d16[2]) +\r
-                                       (actual_v[12 + dvp] * d16[3]) +\r
-                                       (actual_v[11 + dvp] * d16[4]) +\r
-                                       (actual_v[10 + dvp] * d16[5]) +\r
-                                       (actual_v[9 + dvp] * d16[6]) +\r
-                                       (actual_v[8 + dvp] * d16[7]) +\r
-                                       (actual_v[7 + dvp] * d16[8]) +\r
-                                       (actual_v[6 + dvp] * d16[9]) +\r
-                                       (actual_v[5 + dvp] * d16[10]) +\r
-                                       (actual_v[4 + dvp] * d16[11]) +\r
-                                       (actual_v[3 + dvp] * d16[12]) +\r
-                                       (actual_v[2 + dvp] * d16[13]) +\r
-                                       (actual_v[1 + dvp] * d16[14]) +\r
-                                       (actual_v[0 + dvp] * d16[15])\r
+                               pcm_sample = (float)(((actual_v[15 + dvp] * d16[i][0]) +\r
+                                       (actual_v[14 + dvp] * d16[i][1]) +\r
+                                       (actual_v[13 + dvp] * d16[i][2]) +\r
+                                       (actual_v[12 + dvp] * d16[i][3]) +\r
+                                       (actual_v[11 + dvp] * d16[i][4]) +\r
+                                       (actual_v[10 + dvp] * d16[i][5]) +\r
+                                       (actual_v[9 + dvp] * d16[i][6]) +\r
+                                       (actual_v[8 + dvp] * d16[i][7]) +\r
+                                       (actual_v[7 + dvp] * d16[i][8]) +\r
+                                       (actual_v[6 + dvp] * d16[i][9]) +\r
+                                       (actual_v[5 + dvp] * d16[i][10]) +\r
+                                       (actual_v[4 + dvp] * d16[i][11]) +\r
+                                       (actual_v[3 + dvp] * d16[i][12]) +\r
+                                       (actual_v[2 + dvp] * d16[i][13]) +\r
+                                       (actual_v[1 + dvp] * d16[i][14]) +\r
+                                       (actual_v[0 + dvp] * d16[i][15])\r
                                        ) * scalefactor);\r
 \r
             _tmpOut[i] = pcm_sample;                   \r
@@ -1692,11 +1692,13 @@ private void compute_pcm_samples(@LOC("GLOBAL") Obuffer buffer)
        {\r
                try\r
                {\r
-                       Class elemType = Float.TYPE;\r
-                       Object o = JavaLayerUtils.deserializeArrayResource("sfd.ser", elemType, 512);\r
+//                     Class elemType = Float.TYPE;\r
+//                     Object o = JavaLayerUtils.deserializeArrayResource("sfd.ser", elemType, 512);\r
+                    Object o = JavaLayerUtils.deserializeArrayResource("sfd.ser",  512);\r
                        return (float[])o;\r
                }\r
-               catch (IOException ex)\r
+//             catch (IOException ex)\r
+               catch (Exception ex)\r
                {\r
                        throw new ExceptionInInitializerError(ex);\r
                }               \r
index 17b665a..13e4291 100644 (file)
@@ -42,7 +42,7 @@
  * Class to implements Huffman decoder.\r
  */\r
 @LATTICE("FIELD<FINAL")\r
-@METHODDEFAULT("OUT<V,V<SH,SH<IN,SH*,THISLOC=IN,GLOBALLOC=IN");\r
+@METHODDEFAULT("OUT<V,V<SH,SH<IN,SH*,THISLOC=IN,GLOBALLOC=IN")\r
 final class huffcodetab\r
 {\r
   @LOC("FINAL") private static final int        MXOFF=250;\r