當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。