envelope = pEnvelope;
}
public void importMP3() {
try {
Prefs prefs = Prefs.getPrefs();
JFileChooser chooser = new SoundFileChooser(prefs);
if (prefs.getInputSoundFilePath() != null) {
try {
chooser.setCurrentDirectory(new File(prefs.getInputSoundFilePath()));
}
catch (Exception ex) {
ex.printStackTrace();
}
}
if (chooser.showOpenDialog(envelopePanel) == JFileChooser.APPROVE_OPTION) {
File file = chooser.getSelectedFile();
prefs.setLastInputSoundFile(file);
mp3Data = new EnvelopeMP3Data(file.getAbsolutePath());
mp3SettingsChanged();
enableControls();
}
}