public void captureAudio() {
try {
// Get everything set up for
// capture
audioFormat = getAudioFormat();
DataLine.Info dataLineInfo = new DataLine.Info(TargetDataLine.class, audioFormat);
targetDataLine = (TargetDataLine) AudioSystem.getLine(dataLineInfo);
targetDataLine.open(audioFormat);
targetDataLine.start();
// Create a thread to capture the
// microphone data and start it
// running. It will run until
// the Stop button is clicked.
Thread captureThread = new Thread(new CaptureThread());
captureThread.start();
} catch (Exception e) {
Logging.logError(e);
}// end catch
}
AudioCapture.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:project-bianca
作者:
评论列表
文章目录