Skip to main content
gamedev.net
🔒 Locked

[java] OpenAL device problems

Started by Nova_C Jan 20, 2005 at 9:34 PM 0 replies 400+ views
Original Post
Nova_C
Nova_C
I'm trying to use OpenAL in Java using the Sound3D toolkit. The following method is generating a null pointer exception and I can't figure out why: public int initSound(String device) { try { Context context = AudioSystem3D.createContext(AudioSystem3D.openDevice(device)); // This line causes the error. AudioSystem3D.makeContextCurrent(context); AudioSystem3D.init(); return 0; } catch(Exception e) { System.out.println(e); return -1; } } I'm passing the string "DirectSound3D" as the method's parameter. I assume its a device initialization thing, but I can't find a tutorial anywhere on how to use the Sound3D toolkit and the only tutorial I could find on using JOAL was so out of date that the example code didn't work. At all. Thanks for any help.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.