本文整理汇总了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);
}