OpenAL error with recording [SOLVED]

I am trying to create another demo movie of my game, this time with audio, so I am following the instructions as given here.

However, after launching the project with JME, I get the following error and the game does not launch and it throws the error as given below.

12-jan-2013 13:54:26 com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.0.0 Beta
12-jan-2013 13:54:26 com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory: C:\Users\Arjen\Documents\jMonkeyProjects\EnemyAhead
12-jan-2013 13:54:26 com.jme3.system.lwjgl.LwjglAbstractDisplay run
INFO: Using LWJGL 2.8.4
12-jan-2013 13:54:26 com.jme3.system.lwjgl.LwjglDisplay createContext
INFO: Selected display mode: 640 x 480 x 0 @0Hz
12-jan-2013 13:54:26 com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Adapter: atiu9p64 aticfx64 atiu9pag aticfx32 atiumd64 atidxx64 atiumdag atidxx32 atiumdva atiumd6a atitmm64
12-jan-2013 13:54:26 com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Driver Version: null
12-jan-2013 13:54:26 com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Vendor: ATI Technologies Inc.
12-jan-2013 13:54:26 com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: OpenGL Version: 3.2.9551 Compatibility Profile Context
12-jan-2013 13:54:26 com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Renderer: ATI Radeon 3000 Graphics
12-jan-2013 13:54:26 com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: GLSL Ver: 1.50
12-jan-2013 13:54:26 com.jme3.system.lwjgl.LwjglTimer
INFO: Timer resolution: 1.000 ticks per second
12-jan-2013 13:54:26 com.jme3.renderer.lwjgl.LwjglRenderer initialize
INFO: Caps: [FrameBuffer, FrameBufferMRT, FrameBufferMultisample, TextureMultisample, OpenGL20, OpenGL21, OpenGL30, OpenGL31, OpenGL32, ARBprogram, GLSL100, GLSL110, GLSL120, GLSL130, GLSL140, GLSL150, VertexTextureFetch, TextureArray, TextureBuffer, FloatTexture, FloatColorBuffer, FloatDepthBuffer, PackedFloatTexture, SharedExponentTexture, PackedFloatColorBuffer, TextureCompressionLATC, NonPowerOfTwoTextures, MeshInstancing, VertexBufferArray, Multisample, PackedDepthStencilBuffer]
12-jan-2013 13:54:27 com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.blender.BlenderModelLoader
12-jan-2013 13:54:27 com.jme3.asset.DesktopAssetManager
INFO: DesktopAssetManager created.
12-jan-2013 13:54:27 com.jme3.renderer.Camera
INFO: Camera created (W: 640, H: 480)
12-jan-2013 13:54:27 com.jme3.renderer.Camera
INFO: Camera created (W: 640, H: 480)
12-jan-2013 13:54:27 com.jme3.input.lwjgl.LwjglMouseInput initialize
INFO: Mouse created.
12-jan-2013 13:54:27 com.jme3.input.lwjgl.LwjglKeyInput initialize
INFO: Keyboard created.
AL lib: MMDevApiOpenPlayback: Device init failed: 0x80004005
AL lib: MMDevApiOpenPlayback: Device init failed: 0x80004005
AL lib: MMDevApiOpenPlayback: Device init failed: 0x80004005
AL lib: MMDevApiOpenPlayback: Device init failed: 0x80004005
12-jan-2013 13:54:27 initInThread
SEVERE: Failed to load audio library
org.lwjgl.LWJGLException: Could not locate OpenAL library.
at org.lwjgl.openal.AL.create(
at org.lwjgl.openal.AL.create(
at Source)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)

I think it has to do with my onboard soundcard (Realtek ALC662) but I am not sure (I use WIndows 7). When I check the properties with a program named ‘AIDA64 Extreme Edition’ it tells me the OpenAL Properties:
Supplier: Creative Labs Inc.
Renderer: Software
Version: 1.1
Device Name: Generic Software
OpenAL DLL: 6.14.0357.24
Creative OpenAL DLL: Not available
Wrapper DLL:
Hardware Audio Buffers: 0
X-RAM: Not available

OpenAL extensions:
Everything is supported, except for EAX3.0 / EAX4.0 / EAX5.0 and EAX-RAM

To record, I use the following in my main:
[java]File video = File.createTempFile(“JME-water-video”, “.avi”);
File audio = File.createTempFile(“JME-water-audio”, “.wav”);
app.setTimer(new IsoTimer(30));
Capture.captureVideo(app, video);
Capture.captureAudio(app, audio);

When running the game without these lines (and thus without recording) I do not experience any issues with sound at all.

Any idea if and how I can solve this, or am I doomed to record without sound and in parallel record sound via Audacity (for instance) and use blender to put video and audio together?

Well the audio/video recorder completely replaces the audio renderer and its binaries so its kind of prone to be very system-specific in its behavior… Anyway afaik it should work and unpack its own special binary, maybe its a 32/64bit issue? Try running the JVM “the other way”.

I’ve got it working:

I have build the project and then run it from the desktop (so run the JAR-file). This does indeed record movie and audio.

However, it leaves me with a very high frequent tick which last 0,01 seconds and is heard every 0,03 seconds (approximately).

Do you use the default framerate? I think it has problems doing its syncing else as actually there is no real syncing between visuals and audio in games, “in sync” is what comes out of the speakers at about the time the picture shows ^^ Also what kinds of audio do you play? I imagine a longer looped audio file could be problematic.

I have not changed anything when it comes to the frame rate. Also, the only sounds now are from the firing guns and their explosions or water splashes. So I am not playing long or looping sounds.

When I imported both video and audio in Blender, I noticed the video file is shorter then the video, so it seems as if they are not in sync indeed.

Do you have any idea why it partially works when running the JAR-file and not when running from the IDE (jMonkeyEngine)? Is it possible the JAR-file uses 32-bits JVM and the IDE 64-bits? The IDE is installed in the Program Files directory, which means it is the 64-bit version.

Yeah, the nb platform has some executable that fishes out the JDK to run the IDE on (the bit you can configure in jmonkeyplatform.conf) and it might be it finds/uses a 32bit JDK despite the fact its a 64bit application. It should be relatively transparent what and why it runs it though, you can check the JRE/JDK in use by going to the about panel in the SDK.

1 Like

Okay, thank you Normen. I have reinstalled my PC lately and I just discovered I have only the 64-bit JVM installed. I will install the 32-bit as well, so I can check if it is then possible to use the recorder from the IDE instead of needing to run the JAR-file.

I did some further testing with the sound and I still see the sound is shorter then the video. I have recorded to individual png-files and imported then in Blender to make the movie. Importing the wav-file shows it is shorter then the images. First I thought maybe the recorder only starts recording sound when there is actually a sound being played in the game, so I have added a continuous beep during the entire game, but this did not solve the problem.

It now strikes me that in Blender, I set the frame rate to 30fps, but my game properties tell me it runs on 29fps while recording (information in left hand screen corner). But if the game is recorded on 29fps and Blender renders on 30fps, the video should become shorter in relation to the audio when put together?

Anyway, I still have this very rapid ticking over the entire sound file (also clearly visible in Audacity) and the issue with the difference in length of the video and sound. I will check the fps once more to see if there is anything wrong.

Regarding the sound lenght: My bad :roll: --> After setting the frame rate in Blender to 30fps and re-importing the sound (you need to re-import the sound after changing the frame rate in Blender), they are both of equal lenght.

The ticking is only there when I use framerates below 43 fps. After setting IsoTimer to 43 or higher, the ticking is gone:
[java]if (doRecord)
File video = new File(“C:\test1”);
File audio = new File(“C:\test1\audio.wav”);
app.setTimer(new IsoTimer(43));
Capture.captureVideo(app, video);
Capture.captureAudio(app, audio);


No idea why this is, but for now it works for me. Only thing is I have to accept more png-files for the movie…

OpenAL error while running from the SDK is not solved, but since I have a work-a-round by recording after running the jar-file, I consider this subject to be close.