Main Menu

Sound?

Started by Anonymous, March 07, 2005, 03:12:53 PM

Previous topic - Next topic

Anonymous

hi, i'm using the jpct engine to design a sort of car game. what i'm wondering is how to get sound into the game. from what i've seen, the engine itself doesn't cater for it so i tried sing the java media framework but i found it a bit on the slow side. so i'm wondering how you implemented sound in the example games.

the engine is really great by the way, it's great to use and easy to understand.

also i was thinking about incorporating video playback into the whole thing so if you have any ideas about that, it would also be appreciated

EgonOlsen

The examples don't have any sound. Paradroidz has (http://www.jpct.net/paradroidz). I'm using a two way approach in this game as i'm using OpenAL (provided by LWJGL) where available and JavaSound where not (or where OpenAL doesn't work). This works fine so far. If you intend to do an applet, you may be limited to JavaSound anyway...i don't know if LWJGL's OpenAL stuff will work in an applet.
Just keep in mind that JavaSound in Java5 is totally screwed up and that you have to use a workaround to get it running correctly.

raft

how do you adjust sound effects to distance and direction with java sound ? by 'manually' calculating pan and gain values ?

is there any lightweight pure java alternative to java sound ? i dont want jmf since it's a quite fat api and people say it's slow

ps: i know almost nothing about sound programming

r a f t

EgonOlsen

Quote from: "raft"how do you adjust sound effects to distance and direction with java sound ? by 'manually' calculating pan and gain values ?
I don't. My sounds are always at 100%. I'm not very keen in sound programming too (albeit if written some SoundBlaster drivers for DOS, but ... :roll: ). LWJGL isn't an option for adding sound support? It's simple to use and works on Linux, Windows and Mac. But JavaSound isn't that bad for simple things too.

raft

it's an option but at the moment i prefer staying with pure java.