Steam® Audio for JME / Work in Progress - UPDATE 18/12/18

LAST UPDATE: 18/12/18

Since my previous post (Steam Audio - the PBR of sounds), I’ve got the help of @aegroto and we started to implement Steam Audio in jme:

It’s still a partial implementation ( TODO list ).

For now the following effects are supported:

  • HRTF
  • Occlusion with materials support
  • Physically accurate distance attenuation
  • Directivity
  • Sound propagation / reverb

As an added bonus, the limit of playable sources is configurable (255 by default).

Builds are available on github’s releases and bintray for 64 bit Linux, OSX and Windows.

Here there is a small demo (video below)

(WASD to move, mouse1 to shoot bananas)

20 Likes

I seem to be running into an error whenever I move around in the JaimesHut demo:

Sep 22, 2018 5:03:26 PM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.IllegalStateException: Can only set source id when stopped
        at com.jme3.audio.AudioNode.setChannel(AudioNode.java:253)
        at com.jme3.phonon.scene.PhononSourceSlot.setSource(PhononSourceSlot.java:163)
        at com.jme3.phonon.PhononRenderer$1$1.run(PhononRenderer.java:296)
        at com.jme3.phonon.thread.ThreadSafeQueue.run(ThreadSafeQueue.java:51)
        at com.jme3.phonon.PhononRenderer.update(PhononRenderer.java:236)
        at com.jme3.app.LegacyApplication.update(LegacyApplication.java:730)
        at com.jme3.app.SimpleApplication.update(SimpleApplication.java:227)
        at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
        at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:197)
        at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:232)
        at java.lang.Thread.run(Thread.java:745)

My OS is windows 7 x64

Thank you for the report, there was a bug that made play() callable multiple times by subsequential frames when the framerate was higher than the samplerate , it should be fixed in the new build

1 Like

Thanks for the quick fix, I was able to play around without any issues. I look forward to using jmePhonon.

1 Like

Awesome !!

Thanks so much for the contribution.
Looking forward to use jmePhonon in my game.

1 Like

UPDATE
The new build supports the convolution effect that provide sound propagation (sound bounching off walls).

In this release it is on by default and can be disabled by setting maxConvolutionSources=0.

Updated demo

12 Likes

Cool :slightly_smiling_face:
Thank You Riccardo.

A noob question, thus are you feeding all spatial/mesh information in the scene to the steam audio system ?

Yes, to use direct occlusion and sound propagation, a static copy of the scene is sent to steam audio

1 Like

Do you mean a mesh accurate copy or just as a simplified bounding box or primitive shape like spheres/boxes ?

Mesh accurate, but you can always use a mockup scene if your static geometry is too complex.

2 Likes

Arasso,
means I got it :slightly_smiling_face:
Thanks for clarifying it.

Is that per frame, or just sending a copy of the scene once?

Once, or every time you change your static scene.

How are you building the Java binding? Are you using JNI?

Yes