Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Java Codes or Libraries for In-Game Sounds  (Read 1753 times)
0 Members and 1 Guest are viewing this topic.
Offline olingalan

Junior Newbie





« Posted 2012-01-31 07:59:57 »

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!
Offline krasse
« Reply #1 - Posted 2012-01-31 08:43:04 »

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/

Offline ra4king

JGO Kernel


Medals: 355
Projects: 3
Exp: 5 years


I'm the King!


« Reply #2 - Posted 2012-01-31 09:06:56 »

Adding sounds is a simple 3 lines of code:
1  
2  
3  
4  
5  
6  
7  
8  
9  
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.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Cero
« Reply #3 - Posted 2012-01-31 15:14:21 »

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

Offline Regenuluz
« Reply #4 - Posted 2012-01-31 15:19:44 »

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. ^_^
Offline sproingie

JGO Kernel


Medals: 202



« Reply #5 - Posted 2012-01-31 17:07:04 »

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.

Offline teletubo
« League of Dukes »

JGO Ninja


Medals: 48
Projects: 4
Exp: 8 years



« Reply #6 - Posted 2012-01-31 17:16:53 »

http://www.java-gaming.org/topics/3d-sound-engine/20271/view.html

Paulscode's 3d sound system is my favourite.

Offline gouessej
« Reply #7 - Posted 2012-01-31 18:10:39 »

Adding sounds is a simple 3 lines of code:
1  
2  
3  
4  
5  
6  
7  
8  
9  
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.
The high-level part of the JavaSound API works badly with OpenJDK  Sad

http://www.java-gaming.org/topics/3d-sound-engine/20271/view.html

Paulscode's 3d sound system is my favourite.
Mine too. Paul Lamb Sound Library supports the main sound formats and works both with OpenAL and JavaSound.

Offline olingalan

Junior Newbie





« Reply #8 - Posted 2012-02-02 10:14:34 »

tnx for helping me out guys.. i'm so sorry.. i'm a newbie here in java-gaming.org.... never gonna happen again  Wink
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

SHC (22 views)
2014-11-25 12:00:59

SHC (20 views)
2014-11-25 11:53:45

Norakomi (18 views)
2014-11-25 11:26:43

Gibbo3771 (22 views)
2014-11-24 19:59:16

trollwarrior1 (36 views)
2014-11-22 12:13:56

xFryIx (74 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (41 views)
2014-11-12 21:09:33

kovacsa (67 views)
2014-11-07 19:57:14
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!