Sound in a game

hey  :slight_smile:

Can someone please tell me how to add a song/sound into a game??

Example here:

As easy as it gets.

kk :slight_smile: nice, thx. but where do I find it  :expressionless:

In the source of jME which can either be downloaded from CVS or in the nightly build.

I can't import this:

do I need someting more than just the jME library???


If you downloaded the nightly build it comes with several JARs and the jme.jar only contains the core features.  Any package that references com.jmex is extensions upon that core and would be an additional JAR.

Also, please don't double post.

ok… thx

but in which jar is the NEW sound system? Couldn't find it in the nightly build jars, just in the src…

Might not be part of the build script?

Renanse is right.

I had this problem and rebuilt the jme distribution adding this to the build.xml (ant script):

<target name="dist-audio" depends="compile" description="generate jme jar file (sound)">
         <jar jarfile="${jars}/jme-audio.jar" basedir="${class}" update="no" compress="false" includes="**/com/jmex/audio/**/*.class" />

in the proper section, for building the audio jar file, and...

<target name="dist-all" depends="dist-core, dist-terrain, dist-awt, dist-effects, dist-model, dist-collada, dist-sound, dist-audio, dist-editors, dist-font, dist-gamestates, dist-scene" description="Generate all jar files" />

Altered this line, adding the dist-audio dependence for the dist-all target.

Rebuilt with eclipse and that's it.

we need this in the cvs build script if that isn't there already

bump, as reported in the target is still missing. Also, the new xml classes don't seem to have a target yet.