当前位置: 首页>>代码示例>>Java>>正文


Java MidiConfigUtils类代码示例

本文整理汇总了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;
}
 
开发者ID:theokyr,项目名称:TuxGuitar-1.3.1-fork,代码行数:26,代码来源:MidiPortSynthesizer.java

示例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();
	}
}
 
开发者ID:theokyr,项目名称:TuxGuitar-1.3.1-fork,代码行数:17,代码来源:SBInstaller.java

示例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;
}
 
开发者ID:Totallicks,项目名称:totallicks-tuxguitar,代码行数:26,代码来源:MidiPortSynthesizer.java

示例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();
	}
}
 
开发者ID:Totallicks,项目名称:totallicks-tuxguitar,代码行数:17,代码来源:SBInstaller.java

示例5: openSettingsDialog

import org.herac.tuxguitar.player.impl.jsa.utils.MidiConfigUtils; //导入依赖的package包/类
public void openSettingsDialog(Shell parent) {
	MidiConfigUtils.setupDialog(this.context, parent);
}
 
开发者ID:theokyr,项目名称:TuxGuitar-1.3.1-fork,代码行数:4,代码来源:MidiSettingsHandler.java

示例6: setupDialog

import org.herac.tuxguitar.player.impl.jsa.utils.MidiConfigUtils; //导入依赖的package包/类
public void setupDialog(Shell parent) {
	MidiConfigUtils.setupDialog(parent);
}
 
开发者ID:Totallicks,项目名称:totallicks-tuxguitar,代码行数:4,代码来源:MidiPluginList.java


注:本文中的org.herac.tuxguitar.player.impl.jsa.utils.MidiConfigUtils类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。