jdk/src/share/classes/com/sun/media/sound/SoftMixingSourceDataLine.java
changeset 11893 6a3b541908ae
parent 5506 202f599c92aa
child 18215 b2afd66ce6db
equal deleted inserted replaced
11892:1b260c532b70 11893:6a3b541908ae
   128         if (!isOpen())
   128         if (!isOpen())
   129             return 0;
   129             return 0;
   130         if (len % framesize != 0)
   130         if (len % framesize != 0)
   131             throw new IllegalArgumentException(
   131             throw new IllegalArgumentException(
   132                     "Number of bytes does not represent an integral number of sample frames.");
   132                     "Number of bytes does not represent an integral number of sample frames.");
       
   133         if (off < 0) {
       
   134             throw new ArrayIndexOutOfBoundsException(off);
       
   135         }
       
   136         if ((long)off + (long)len > (long)b.length) {
       
   137             throw new ArrayIndexOutOfBoundsException(b.length);
       
   138         }
   133 
   139 
   134         byte[] buff = cycling_buffer;
   140         byte[] buff = cycling_buffer;
   135         int buff_len = cycling_buffer.length;
   141         int buff_len = cycling_buffer.length;
   136 
   142 
   137         int l = 0;
   143         int l = 0;