/** Creates new SampledSoundPlayer labeled number i, using sampled sound stored as preference for this number.
*
* @param i an index, used to look up the preferred sound file.
* @throws IOException
* @throws LineUnavailableException
* @throws UnsupportedAudioFileException
*/
public SampledSoundPlayer(int i)throws IOException, UnsupportedAudioFileException, LineUnavailableException{
drumNumber=i;
soundNumber=prefs.getInt(prefsKey(),0);
if(soundNumber>=SampledSoundPlayer.getSoundFilePaths().size()) {
throw new IOException("There is no sound number "+soundNumber+" available");
}
setFile(soundNumber);
open();
}
SampledSoundPlayer.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:jaer
作者:
评论列表
文章目录