diff --git a/jme3-android/src/main/java/com/jme3/asset/AndroidAssetManager.java b/jme3-android/src/main/java/com/jme3/asset/AndroidAssetManager.java index 43a8b6e1e..9873a8476 100644 --- a/jme3-android/src/main/java/com/jme3/asset/AndroidAssetManager.java +++ b/jme3-android/src/main/java/com/jme3/asset/AndroidAssetManager.java @@ -34,10 +34,12 @@ package com.jme3.asset; import com.jme3.asset.plugins.AndroidLocator; import com.jme3.asset.plugins.ClasspathLocator; import com.jme3.audio.plugins.AndroidAudioLoader; +import com.jme3.audio.plugins.NativeVorbisLoader; import com.jme3.audio.plugins.WAVLoader; import com.jme3.system.AppSettings; import com.jme3.system.android.JmeAndroidSystem; import com.jme3.texture.plugins.AndroidBufferImageLoader; +import com.jme3.texture.plugins.AndroidNativeImageLoader; import java.net.URL; import java.util.logging.Level; import java.util.logging.Logger; @@ -51,16 +53,6 @@ public class AndroidAssetManager extends DesktopAssetManager { private static final Logger logger = Logger.getLogger(AndroidAssetManager.class.getName()); - public AndroidAssetManager() { - this(null); - } - - @Deprecated - public AndroidAssetManager(boolean loadDefaults) { - //this(Thread.currentThread().getContextClassLoader().getResource("com/jme3/asset/Android.cfg")); - this(null); - } - private void registerLoaderSafe(String loaderClass, String ... extensions) { try { Class loader = (Class) Class.forName(loaderClass); @@ -82,16 +74,13 @@ public class AndroidAssetManager extends DesktopAssetManager { registerLocator("", AndroidLocator.class); registerLocator("", ClasspathLocator.class); - registerLoader(AndroidBufferImageLoader.class, "jpg", "bmp", "jpeg"); - registerLoader(AndroidBufferImageLoader.class, "gif", "png"); + registerLoader(AndroidNativeImageLoader.class, "jpg", "jpeg", "bmp", "gif", "png"); if (JmeAndroidSystem.getAudioRendererType().equals(AppSettings.ANDROID_MEDIAPLAYER)) { registerLoader(AndroidAudioLoader.class, "ogg", "mp3", "wav"); } else if (JmeAndroidSystem.getAudioRendererType().equals(AppSettings.ANDROID_OPENAL_SOFT)) { registerLoader(WAVLoader.class, "wav"); - // TODO jogg is not in core, need to add some other way to get around compile errors, or not. -// registerLoader(com.jme3.audio.plugins.OGGLoader.class, "ogg"); - registerLoaderSafe("com.jme3.audio.plugins.OGGLoader", "ogg"); + registerLoader(NativeVorbisLoader.class, "ogg"); } else { throw new IllegalStateException("No Audio Renderer Type defined!"); } diff --git a/jme3-android/src/main/java/com/jme3/system/android/JmeAndroidSystem.java b/jme3-android/src/main/java/com/jme3/system/android/JmeAndroidSystem.java index 6f01db53b..e036a53e1 100644 --- a/jme3-android/src/main/java/com/jme3/system/android/JmeAndroidSystem.java +++ b/jme3-android/src/main/java/com/jme3/system/android/JmeAndroidSystem.java @@ -32,7 +32,7 @@ import java.util.logging.Level; public class JmeAndroidSystem extends JmeSystemDelegate { private static Activity activity; - private static String audioRendererType = AppSettings.ANDROID_MEDIAPLAYER; + private static String audioRendererType = AppSettings.ANDROID_OPENAL_SOFT; static { try {