Package com.neuralnetwork.jbrain.exceptions

Examples of com.neuralnetwork.jbrain.exceptions.JbrainException


    TargetDataLine line;
    DataLine.Info info = new DataLine.Info(TargetDataLine.class,
        format);
   
    if (!AudioSystem.isLineSupported(info)) {
      throw new JbrainException("Line not supported.");
    }
   
    byte[] data = new byte[dataSize];
   
    try {
        line = (TargetDataLine) AudioSystem.getLine(info);
        line.open(format);
      line.read(data, 0, data.length);
      line.flush();
      line.close();
    } catch (LineUnavailableException ex) {
      throw new JbrainException(ex.getMessage());
    }
   
    return ArrayUtils.toObject(data);
  }
View Full Code Here

TOP

Related Classes of com.neuralnetwork.jbrain.exceptions.JbrainException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.