本文整理汇总了Java中paulscode.sound.SoundSystemLogger类的典型用法代码示例。如果您正苦于以下问题:Java SoundSystemLogger类的具体用法?Java SoundSystemLogger怎么用?Java SoundSystemLogger使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SoundSystemLogger类属于paulscode.sound包,在下文中一共展示了SoundSystemLogger类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadSoundSystem
import paulscode.sound.SoundSystemLogger; //导入依赖的package包/类
/**
* Tries to add the paulscode library and the relevant codecs. If it fails, the master volume will be set to zero.
*/
private synchronized void loadSoundSystem()
{
if (!this.loaded)
{
try
{
(new Thread(new Runnable()
{
public void run()
{
SoundSystemConfig.setLogger(new SoundSystemLogger()
{
public void message(String p_message_1_, int p_message_2_)
{
if (!p_message_1_.isEmpty())
{
SoundManager.logger.info(p_message_1_);
}
}
public void importantMessage(String p_importantMessage_1_, int p_importantMessage_2_)
{
if (!p_importantMessage_1_.isEmpty())
{
SoundManager.logger.warn(p_importantMessage_1_);
}
}
public void errorMessage(String p_errorMessage_1_, String p_errorMessage_2_, int p_errorMessage_3_)
{
if (!p_errorMessage_2_.isEmpty())
{
SoundManager.logger.error("Error in class \'" + p_errorMessage_1_ + "\'");
SoundManager.logger.error(p_errorMessage_2_);
}
}
});
SoundManager.this.sndSystem = SoundManager.this.new SoundSystemStarterThread();
SoundManager.this.loaded = true;
SoundManager.this.sndSystem.setMasterVolume(SoundManager.this.options.getSoundLevel(SoundCategory.MASTER));
SoundManager.logger.info(SoundManager.LOG_MARKER, "Sound engine started");
}
}, "Sound Library Loader")).start();
}
catch (RuntimeException runtimeexception)
{
logger.error(LOG_MARKER, (String)"Error starting SoundSystem. Turning off sounds & music", (Throwable)runtimeexception);
this.options.setSoundLevel(SoundCategory.MASTER, 0.0F);
this.options.saveOptions();
}
}
}
示例2: loadSoundSystem
import paulscode.sound.SoundSystemLogger; //导入依赖的package包/类
/**
* Tries to add the paulscode library and the relevant codecs. If it fails, the master volume will be set to zero.
*/
private synchronized void loadSoundSystem()
{
if (!this.loaded)
{
try
{
(new Thread(new Runnable()
{
public void run()
{
SoundSystemConfig.setLogger(new SoundSystemLogger()
{
public void message(String p_message_1_, int p_message_2_)
{
if (!p_message_1_.isEmpty())
{
SoundManager.LOGGER.info(p_message_1_);
}
}
public void importantMessage(String p_importantMessage_1_, int p_importantMessage_2_)
{
if (!p_importantMessage_1_.isEmpty())
{
SoundManager.LOGGER.warn(p_importantMessage_1_);
}
}
public void errorMessage(String p_errorMessage_1_, String p_errorMessage_2_, int p_errorMessage_3_)
{
if (!p_errorMessage_2_.isEmpty())
{
SoundManager.LOGGER.error("Error in class \'{}\'", new Object[] {p_errorMessage_1_});
SoundManager.LOGGER.error(p_errorMessage_2_);
}
}
});
SoundManager.this.sndSystem = SoundManager.this.new SoundSystemStarterThread();
SoundManager.this.loaded = true;
SoundManager.this.sndSystem.setMasterVolume(SoundManager.this.options.getSoundLevel(SoundCategory.MASTER));
SoundManager.LOGGER.info(SoundManager.LOG_MARKER, "Sound engine started");
}
}, "Sound Library Loader")).start();
}
catch (RuntimeException runtimeexception)
{
LOGGER.error(LOG_MARKER, (String)"Error starting SoundSystem. Turning off sounds & music", (Throwable)runtimeexception);
this.options.setSoundLevel(SoundCategory.MASTER, 0.0F);
this.options.saveOptions();
}
}
}