本文整理匯總了Java中org.herac.tuxguitar.player.impl.jsa.utils.MidiConfigUtils類的典型用法代碼示例。如果您正苦於以下問題:Java MidiConfigUtils類的具體用法?Java MidiConfigUtils怎麽用?Java MidiConfigUtils使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MidiConfigUtils類屬於org.herac.tuxguitar.player.impl.jsa.utils包,在下文中一共展示了MidiConfigUtils類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getSynth
import org.herac.tuxguitar.player.impl.jsa.utils.MidiConfigUtils; //導入依賴的package包/類
public Synthesizer getSynth() {
try {
if(!this.synth.isOpen()){
this.synth.open();
if(!isSoundbankLoaded( false )){
String path = MidiConfigUtils.getSoundbankPath(this.context);
if( path != null ){
this.loadSoundbank(new File(TGExpressionResolver.getInstance(this.context).resolve(path)));
}
if(!isSoundbankLoaded( true )){
this.loadSoundbank(this.synth.getDefaultSoundbank());
}
if(!isSoundbankLoaded( true )){
new SBAssistant(this.context, this).process();
}
}
}
this.synthesizerLoaded = this.synth.isOpen();
} catch (Throwable throwable) {
throwable.printStackTrace();
}
return this.synth;
}
示例2: install
import org.herac.tuxguitar.player.impl.jsa.utils.MidiConfigUtils; //導入依賴的package包/類
private void install(File file){
try {
this.listener.notifyProcess(TuxGuitar.getProperty("jsa.soundbank-assistant.process.installing",new String[]{file.getAbsolutePath()}));
if( ! this.synthesizer.loadSoundbank(file) ){
this.listener.notifyFailed(new MidiPlayerException(TuxGuitar.getProperty("jsa.error.soundbank.custom")));
return;
}
TGConfigManager config = MidiConfigUtils.getConfig(this.context);
config.setValue(MidiConfigUtils.SOUNDBANK_KEY,file.getAbsolutePath());
config.save();
} catch (Throwable throwable) {
throwable.printStackTrace();
}
}
示例3: getSynthesizer
import org.herac.tuxguitar.player.impl.jsa.utils.MidiConfigUtils; //導入依賴的package包/類
public Synthesizer getSynthesizer() {
try {
if(!this.synthesizer.isOpen()){
this.synthesizer.open();
if(!isSoundbankLoaded( false )){
String path = MidiConfigUtils.getSoundbankPath();
if(path != null){
this.loadSoundbank(new File(path));
}
if(!isSoundbankLoaded( true )){
this.loadSoundbank( this.synthesizer.getDefaultSoundbank() );
}
if(!isSoundbankLoaded( true )){
new SBAssistant(this).process();
}
}
}
this.synthesizerLoaded = this.synthesizer.isOpen();
} catch (Throwable throwable) {
throwable.printStackTrace();
}
return this.synthesizer;
}
示例4: install
import org.herac.tuxguitar.player.impl.jsa.utils.MidiConfigUtils; //導入依賴的package包/類
private void install(File file){
try {
this.listener.notifyProcess(TuxGuitar.getProperty("jsa.soundbank-assistant.process.installing",new String[]{file.getAbsolutePath()}));
if( ! this.synthesizer.loadSoundbank(file) ){
this.listener.notifyFailed(new MidiPlayerException(TuxGuitar.getProperty("jsa.error.soundbank.custom")));
return;
}
TGConfigManager config = MidiConfigUtils.getConfig();
config.setProperty(MidiConfigUtils.SOUNDBANK_KEY,file.getAbsolutePath());
config.save();
} catch (Throwable throwable) {
throwable.printStackTrace();
}
}
示例5: openSettingsDialog
import org.herac.tuxguitar.player.impl.jsa.utils.MidiConfigUtils; //導入依賴的package包/類
public void openSettingsDialog(Shell parent) {
MidiConfigUtils.setupDialog(this.context, parent);
}
示例6: setupDialog
import org.herac.tuxguitar.player.impl.jsa.utils.MidiConfigUtils; //導入依賴的package包/類
public void setupDialog(Shell parent) {
MidiConfigUtils.setupDialog(parent);
}