/**
* Plays a sound clip.
* @param clip the Clip to play
* @param volume the volume [0, 1]
* @param listener the line listener
*/
private static void playClip(MultiClip clip, float volume, LineListener listener) {
if (clip == null) // clip failed to load properly
return;
currentSoundComponent = clip;
if (volume > 0f && !isMuted) {
try {
clip.start(volume, listener);
} catch (LineUnavailableException e) {
explode(String.format("Could not start a clip '%s'.", clip.getName()), e, DEFAULT_OPTIONS);
}
}
}
SoundController.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:opsu-dance
作者:
评论列表
文章目录