Author Topic: Sound?  (Read 3920 times)

Anonymous

  • Guest
Sound?
« on: March 07, 2005, 03:12:53 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Sound?
« Reply #1 on: March 07, 2005, 06:18:30 pm »
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.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Sound?
« Reply #2 on: March 23, 2006, 09:00:03 pm »
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

Code: [Select]
r a f t

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Sound?
« Reply #3 on: March 24, 2006, 05:11:43 pm »
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.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Sound?
« Reply #4 on: March 24, 2006, 05:54:30 pm »
it's an option but at the moment i prefer staying with pure java.