AL extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFTX_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_source_latency
Jan 22, 2020 6:03:05 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
WARNING: Pausing audio device not supported.
Jan 22, 2020 6:03:05 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio effect extension version: 1.0
Jan 22, 2020 6:03:05 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio max auxiliary sends: 4
Jan 22, 2020 6:03:05 PM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.NullPointerException
at mygame.Main.simpleInitApp(Main.java:78)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
at java.lang.Thread.run(Thread.java:748)
[/java]
Because the music is write in another class,so I create a private Sound sound; to call the method that I had write in the Sound.java. Here is my code to call it:
We would need to see the code that created the audionode and plays it. The line that throws the nullpointer is null. Nullpointers are amongst the easiest problems to solve.
âŚyou havenât even shown us that code. The bug is in the code you didnât post. The one that should have set âsoundâ to something and didnât.
Without understanding how to code in Java, trying random things isnât going to be very productive.
I recommend that you run through some basic Java tutorials until you have a better grasp of the language and how to program. The rest of your journey will go much more easily.