Java Codes or Libraries for In-Game Sounds

Hi guys! I’m a computer science student and my partner(in thesis) and I are developing a game ung JAVA NETBEANS IDE…

We wonder if u can help us out in choosing or giving us hint on how we can put sounds or sound effects in our game…

Asking for codes or libraries or programming guides here… tnx guys! more power!

BFXR is a nice SFX generator:
http://www.bfxr.net/

I have ported its predecessor, SFXR, to Java if you want to have the effects generated within the game:
http://www.springworldgames.com/sfxrjava/

Adding sounds is a simple 3 lines of code:


import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;

...

AudioInputStream in = AudioSystem.getAudioInputStream(getClass().getResource("relative/path/to/sound.wav"));
Clip clip = AudioSystem.getClip();
clip.open(in);

Then you can call Clip’s methods to play, stop, loop, etc…

Note, Java only supports WAV, AIFF, and AU.

HEY WHATS UP WITH YOUR CAPS LOCK, IN EVERY DAMN THREAD THAT YOU CREATE
I THINK ITS RATHER RUDE

+1

I was just commenting on this to my gf, so mental highfive. :slight_smile:

Please don’t use CAPS LOCK for your post titles. Also, while we’re happy to help members of the community, we are not free tech support who will simply provide documentation dumps for which a few minutes of using Google would also suffice.

Paulscode’s 3d sound system is my favourite.

The high-level part of the JavaSound API works badly with OpenJDK :frowning:

Mine too. Paul Lamb Sound Library supports the main sound formats and works both with OpenAL and JavaSound.

tnx for helping me out guys… i’m so sorry… i’m a newbie here in java-gaming.org… never gonna happen again :wink: