use of sidplay.ini.IniConfig in project assembly64fx by freabemania.
the class SidifyPlaySingleSidController method init.
public void init(File sid) {
try {
final IniConfig config = new IniConfig(true);
songName.setText(sid.getName());
SidTune tune = SidTune.load(sid);
tune.getInfo().setSelectedSong(null);
player = new Player(config);
player.setTune(tune);
player.getTimer().setStart(0);
player.startC64();
playing = true;
} catch (Exception e) {
LOGGER.error("Unable to play sid", e);
throw new RuntimeException(e);
}
}
use of sidplay.ini.IniConfig in project assembly64fx by freabemania.
the class SIDPlayerService method init.
public void init() {
localDbService = LocalDBService.getInstance();
currVol = Float.valueOf(localDbService.getLocalDBSetting(SIDIFY_VOLUME, "0")).floatValue();
try {
if (player != null) {
player.stopC64();
}
} catch (Exception e) {
logger.error("Unable to stop c64", e);
}
final IniConfig config = new IniConfig(true);
config.getSidplay2Section().setLoop(true);
config.getSidplay2Section().setDefaultPlayLength(MAX_PLAYLENGTH);
if (localDbService.getLocalDBSetting(Support.SIDMODEL_SETTING, Support.SIDAUTO).equals(Support.SID8580)) {
config.getEmulationSection().setUserSidModel(ChipModel.MOS8580);
} else if (localDbService.getLocalDBSetting(Support.SIDMODEL_SETTING).equals(Support.SID6581)) {
config.getEmulationSection().setUserSidModel(ChipModel.MOS6581);
} else {
config.getEmulationSection().setUserSidModel(ChipModel.AUTO);
}
config.getEmulationSection().setDefaultSidModel(ChipModel.MOS8580);
config.getAudioSection().setBufferSize(65536);
config.getSidplay2Section().setFadeInTime(0);
config.getSidplay2Section().setFadeOutTime(2);
player = new Player(config);
}