本文整理了Java中com.jme3.system.AppSettings.getAudioRenderer()
方法的一些代码示例,展示了AppSettings.getAudioRenderer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppSettings.getAudioRenderer()
方法的具体详情如下:
包路径:com.jme3.system.AppSettings
类名称:AppSettings
方法名:getAudioRenderer
[英]Get the audio renderer
[中]获取音频渲染器
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public JmeContext newContext(AppSettings settings, Type contextType) {
if (settings.getAudioRenderer().equals(AppSettings.ANDROID_MEDIAPLAYER)) {
audioRendererType = AppSettings.ANDROID_MEDIAPLAYER;
} else if (settings.getAudioRenderer().equals(AppSettings.ANDROID_OPENAL_SOFT)) {
audioRendererType = AppSettings.ANDROID_OPENAL_SOFT;
} else {
logger.log(Level.INFO, "AudioRenderer not set. Defaulting to OpenAL Soft");
audioRendererType = AppSettings.ANDROID_OPENAL_SOFT;
}
initialize(settings);
JmeContext ctx = new OGLESContext();
ctx.setSettings(settings);
return ctx;
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public AudioRenderer newAudioRenderer(AppSettings settings) {
initialize(settings);
AL al;
ALC alc;
EFX efx;
if (settings.getAudioRenderer().startsWith("LWJGL")) {
al = newObject("com.jme3.audio.lwjgl.LwjglAL");
alc = newObject("com.jme3.audio.lwjgl.LwjglALC");
efx = newObject("com.jme3.audio.lwjgl.LwjglEFX");
} else if (settings.getAudioRenderer().startsWith("JOAL")) {
al = newObject("com.jme3.audio.joal.JoalAL");
alc = newObject("com.jme3.audio.joal.JoalALC");
efx = newObject("com.jme3.audio.joal.JoalEFX");
} else {
throw new UnsupportedOperationException(
"Unrecognizable audio renderer specified: "
+ settings.getAudioRenderer());
}
if (al == null || alc == null || efx == null) {
return null;
}
return new ALAudioRenderer(al, alc, efx);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
protected void loadNatives() {
if (JmeSystem.isLowPermissions()) {
return;
}
if ("LWJGL".equals(settings.getAudioRenderer())) {
NativeLibraryLoader.loadNativeLibrary("openal", true);
}
if (settings.useJoysticks()) {
NativeLibraryLoader.loadNativeLibrary("jinput", true);
NativeLibraryLoader.loadNativeLibrary("jinput-dx8", true);
}
NativeLibraryLoader.loadNativeLibrary("lwjgl", true);
}
protected int getNumSamplesToUse() {
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
protected void loadNatives() {
if (JmeSystem.isLowPermissions()) {
return;
}
if ("LWJGL".equals(settings.getAudioRenderer())) {
NativeLibraryLoader.loadNativeLibrary("openal-lwjgl3", true);
}
if (NativeLibraryLoader.isUsingNativeBullet()) {
NativeLibraryLoader.loadNativeLibrary("bulletjme", true);
}
NativeLibraryLoader.loadNativeLibrary("glfw-lwjgl3", true);
NativeLibraryLoader.loadNativeLibrary("jemalloc-lwjgl3", true);
NativeLibraryLoader.loadNativeLibrary("lwjgl3", true);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
private void initAudio(){
if (settings.getAudioRenderer() != null && context.getType() != Type.Headless){
audioRenderer = JmeSystem.newAudioRenderer(settings);
audioRenderer.initialize();
AudioContext.setAudioRenderer(audioRenderer);
listener = new Listener();
audioRenderer.setListener(listener);
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
private void initAudio(){
if (settings.getAudioRenderer() != null && context.getType() != JmeContext.Type.Headless){
audioRenderer = JmeSystem.newAudioRenderer(settings);
audioRenderer.initialize();
AudioContext.setAudioRenderer(audioRenderer);
listener = new Listener();
audioRenderer.setListener(listener);
}
}
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-desktop
@Override
public AudioRenderer newAudioRenderer(AppSettings settings) {
initialize(settings);
AL al;
ALC alc;
EFX efx;
if (settings.getAudioRenderer().startsWith("LWJGL")) {
al = newObject("com.jme3.audio.lwjgl.LwjglAL");
alc = newObject("com.jme3.audio.lwjgl.LwjglALC");
efx = newObject("com.jme3.audio.lwjgl.LwjglEFX");
} else if (settings.getAudioRenderer().startsWith("JOAL")) {
al = newObject("com.jme3.audio.joal.JoalAL");
alc = newObject("com.jme3.audio.joal.JoalALC");
efx = newObject("com.jme3.audio.joal.JoalEFX");
} else {
throw new UnsupportedOperationException(
"Unrecognizable audio renderer specified: "
+ settings.getAudioRenderer());
}
if (al == null || alc == null || efx == null) {
return null;
}
return new ALAudioRenderer(al, alc, efx);
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
private void initAudio(){
if (settings.getAudioRenderer() != null && context.getType() != Type.Headless){
audioRenderer = JmeSystem.newAudioRenderer(settings);
audioRenderer.initialize();
AudioContext.setAudioRenderer(audioRenderer);
listener = new Listener();
audioRenderer.setListener(listener);
}
}
代码示例来源:origin: info.projectkyoto/mms-engine
private void initAudio(){
if (settings.getAudioRenderer() != null && context.getType() != Type.Headless){
audioRenderer = JmeSystem.newAudioRenderer(settings);
audioRenderer.initialize();
AudioContext.setAudioRenderer(audioRenderer);
listener = new Listener();
audioRenderer.setListener(listener);
}
}
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl
protected void loadNatives() {
if (JmeSystem.isLowPermissions()) {
return;
}
if ("LWJGL".equals(settings.getAudioRenderer())) {
NativeLibraryLoader.loadNativeLibrary("openal", true);
}
if (settings.useJoysticks()) {
NativeLibraryLoader.loadNativeLibrary("jinput", true);
NativeLibraryLoader.loadNativeLibrary("jinput-dx8", true);
}
if (NativeLibraryLoader.isUsingNativeBullet()) {
NativeLibraryLoader.loadNativeLibrary("bulletjme", true);
}
NativeLibraryLoader.loadNativeLibrary("lwjgl", true);
}
内容来源于网络,如有侵权,请联系作者删除!