Search in sources :

Example 11 with AudioNode

use of com.jme3.audio.AudioNode in project jmonkeyengine by jMonkeyEngine.

the class SoundHandleJme method play.

public void play() {
    if (fileName != null) {
        if (node != null) {
            node.stop();
        }
        node = new AudioNode(am, fileName, true);
        node.setPositional(false);
        node.setVolume(volume);
        node.play();
    } else {
        node.playInstance();
    }
}
Also used : AudioNode(com.jme3.audio.AudioNode)

Example 12 with AudioNode

use of com.jme3.audio.AudioNode in project jmonkeyengine by jMonkeyEngine.

the class SoundEvent method initEvent.

@Override
public void initEvent(Application app, Cinematic cinematic) {
    super.initEvent(app, cinematic);
    audioNode = new AudioNode(app.getAssetManager(), path, stream);
    audioNode.setPositional(false);
    setLoopMode(loopMode);
}
Also used : AudioNode(com.jme3.audio.AudioNode)

Example 13 with AudioNode

use of com.jme3.audio.AudioNode in project jmonkeyengine by jMonkeyEngine.

the class TestMusicStreaming method simpleInitApp.

@Override
public void simpleInitApp() {
    assetManager.registerLocator("http://www.vorbis.com/music/", UrlLocator.class);
    AudioNode audioSource = new AudioNode(assetManager, "Lumme-Badloop.ogg", true);
    audioSource.setPositional(false);
    audioSource.setReverbEnabled(false);
    audioSource.play();
}
Also used : AudioNode(com.jme3.audio.AudioNode)

Example 14 with AudioNode

use of com.jme3.audio.AudioNode in project jmonkeyengine by jMonkeyEngine.

the class TestOgg method simpleInitApp.

@Override
public void simpleInitApp() {
    System.out.println("Playing without filter");
    audioSource = new AudioNode(assetManager, "Sound/Effects/Foot steps.ogg", DataType.Buffer);
    audioSource.play();
}
Also used : AudioNode(com.jme3.audio.AudioNode)

Example 15 with AudioNode

use of com.jme3.audio.AudioNode in project jmonkeyengine by jMonkeyEngine.

the class TestWav method simpleInitApp.

@Override
public void simpleInitApp() {
    audioSource = new AudioNode(assetManager, "Sound/Effects/Gun.wav", false);
    audioSource.setLooping(false);
}
Also used : AudioNode(com.jme3.audio.AudioNode)

Aggregations

AudioNode (com.jme3.audio.AudioNode)13 Environment (com.jme3.audio.Environment)2 LowPassFilter (com.jme3.audio.LowPassFilter)2 Vector3f (com.jme3.math.Vector3f)2 Geometry (com.jme3.scene.Geometry)2 Node (com.jme3.scene.Node)2 Spatial (com.jme3.scene.Spatial)2 AssetInfo (com.jme3.asset.AssetInfo)1 AssetLoader (com.jme3.asset.AssetLoader)1 OGGLoader (com.jme3.audio.plugins.OGGLoader)1 WAVLoader (com.jme3.audio.plugins.WAVLoader)1 InputCapsule (com.jme3.export.InputCapsule)1 ActionListener (com.jme3.input.controls.ActionListener)1 KeyTrigger (com.jme3.input.controls.KeyTrigger)1 AmbientLight (com.jme3.light.AmbientLight)1 DirectionalLight (com.jme3.light.DirectionalLight)1 Material (com.jme3.material.Material)1 ColorRGBA (com.jme3.math.ColorRGBA)1 Quaternion (com.jme3.math.Quaternion)1 FilterPostProcessor (com.jme3.post.FilterPostProcessor)1