400 |
loadOrchestras() { |
loadOrchestras() { |
401 |
if(getJSamplerHome() == null) return; |
if(getJSamplerHome() == null) return; |
402 |
|
|
|
//TODO: This should be removed in the next release (including loadOrchestras0()) |
|
|
File f2 = new File(getJSamplerHome() + File.separator + "orchestras.xml"); |
|
|
if(!f2.isFile()) { |
|
|
loadOrchestras0(); |
|
|
saveOrchestras(); |
|
|
return; |
|
|
} |
|
|
/////// |
|
|
|
|
403 |
try { |
try { |
404 |
String s = getJSamplerHome(); |
String s = getJSamplerHome(); |
405 |
if(s == null) return; |
if(s == null) return; |
435 |
} |
} |
436 |
|
|
437 |
private static void |
private static void |
|
loadOrchestras0() { |
|
|
String s = Prefs.getOrchestras(); |
|
|
if(s == null) return; |
|
|
|
|
|
ByteArrayInputStream bais = new ByteArrayInputStream(s.getBytes()); |
|
|
Document doc = DOMUtils.readObject(bais); |
|
|
|
|
|
try { getOrchestras().readObject(doc.getDocumentElement()); } |
|
|
catch(Exception x) { HF.showErrorMessage(x, "Loading orchestras: "); } |
|
|
} |
|
|
|
|
|
private static void |
|
438 |
saveOrchestras() { |
saveOrchestras() { |
439 |
try { |
try { |
440 |
String s = getJSamplerHome(); |
String s = getJSamplerHome(); |