return;
}
NativeLibrary.addSearchPath("vlc", go.getVLCLibraryPath());
final Render r;
r = new Render(selected_header, go, dm);
if (cb_startPaused.isSelected()) {
r.setStartPaused();
}
if (cb_autoSyncDisplay.isSelected()) {
r.setAutosyncDisplay();
r.setAutosyncCallback(new Render.AutosyncCallback() {
@Override
public void autosyncFinished(double displayLag) {
if (JOptionPane.showConfirmDialog(MusicSelection.this, "This display latency has changed from\n"
+ go.getDisplayLag() + "\nto\n" + displayLag + "\n\nSave this change?",
"Save Display Latency", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
go.setDisplayLag(displayLag);
txt_displayLag.setText(displayLag + "");
cb_autoSyncDisplay.setSelected(false);
}
}
});
}
else if (cb_autoSyncAudio.isSelected()) {
r.setAutosyncAudio();
r.setAutosyncCallback(new Render.AutosyncCallback() {
@Override
public void autosyncFinished(double audioLatency) {
if (JOptionPane.showConfirmDialog(MusicSelection.this, "This audio latency has changed from\n"
+ go.getAudioLatency() + "\nto\n" + audioLatency + "\n\nSave this change?",
"Save Audio Latency", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
go.setAudioLatency(audioLatency);
txt_audioLatency.setText(audioLatency + "");
cb_autoSyncAudio.setSelected(false);
}
}
});
}
r.setLocalMatchingServer(txtLocalMatchingServer.getText());
r.setRank(rank);
r.setJudge(jc_timed_judgment.isSelected()
? new TimeJudgment()
: new BeatJudgment());
if (lastServer != null && !lastServer.isClosed()) {
r.setServer(lastServer);
}
new RenderThread(this.getTopLevelAncestor(), r).start();
} catch (SoundSystemException ex) {
java.util.logging.Logger.getLogger(MusicSelection.class.getName()).log(Level.SEVERE, "{0}", ex);