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


Java SoundSystemLogger类代码示例

本文整理汇总了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();
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:54,代码来源:SoundManager.java

示例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();
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:54,代码来源:SoundManager.java


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