Exemple #1
0
 public int read(byte[] b, int off, int len) throws IOException {
   // System.out.print("'"+len+"'");
   try {
     int ret = line.read(b, off, len);
     //				if (ret > 50 && DEBUG_TRANSPORT && !printedBytes) {
     //					printedBytes = true;
     //					out("AudioCapture: first bytes being captured:");
     //					String s = "";
     //					for (int i = 0; i < 50; i++) {
     //						s += " " + b[i];
     //					}
     //					out(s);
     //				}
     if (isMuted()) {
       muteBuffer(b, off, ret);
     }
     // run some simple analysis
     if (ret > 0) {
       calcCurrVol(b, off, ret);
     }
     return ret;
   } catch (IllegalArgumentException e) {
     throw new IOException(e.getMessage());
   }
 }