public void update(LineEvent lineEvent)
/* Called when the clip's line detects open, close, start, or
stop events. The watcher (if one exists) is notified.
*/
{
// when clip is stopped / reaches its end
if (lineEvent.getType() == LineEvent.Type.STOP) {
// System.out.println("update() STOP for " + name);
clip.stop();
clip.setFramePosition(0); // NEW
if (!isLooping) { // it isn't looping
if (watcher != null)
watcher.atSequenceEnd(name, SoundsWatcher.STOPPED);
}
else { // else play it again
clip.start();
if (watcher != null)
watcher.atSequenceEnd(name, SoundsWatcher.REPLAYED);
}
}
}
ClipInfo.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:revert
作者:
评论列表
文章目录