Examples of AudioNode


Examples of com.jme3.audio.AudioNode

     * @return
     */
    private AudioNode findAudio(Spatial spat) {
        if (spat instanceof AudioNode) {
            //spat is an AudioNode
            AudioNode em = (AudioNode) spat;
            //getting the UserData TrackInfo so check if it should be attached to this Track
            TrackInfo t = (TrackInfo) em.getUserData("TrackInfo");
            if (t != null && t.getTracks().contains(this)) {
                return em;
            }
            return null;

        } else if (spat instanceof Node) {
            for (Spatial child : ((Node) spat).getChildren()) {
                AudioNode em = findAudio(child);
                if (em != null) {
                    return em;
                }
            }
        }
View Full Code Here

Examples of com.jme3.audio.AudioNode

    }

    @Override
    public void initEvent(Application app, Cinematic cinematic) {
        super.initEvent(app, cinematic);
        audioNode = new AudioNode(app.getAssetManager(), path, stream);
        audioNode.setPositional(false);
        setLoopMode(loopMode);
    }
View Full Code Here

Examples of com.jme3.audio.AudioNode

    this.soundfile = soundfile;
  }

  @Override
  public void internalLoadSceneObject() {
    sceneObject = new AudioNode(GlobalObjectStore.<AssetManager>getObject(AssetManager.class), soundfile, true);
  }
View Full Code Here

Examples of com.jme3.audio.AudioNode

    explosion.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 5, 0));
    explosion.getParticleInfluencer().setVelocityVariation(0.4f);

    spatial = explosion;
    Random rand = new Random();
    sound = new AudioNode(world.getAssetManager(), String.format("Sound/Effects/Explosion%d.ogg", rand.nextInt(4) + 1));
    sound.setLooping(false);
    sound.setVolume(0.5f);
    sound.setPositional(true);
    sound.setLocalTranslation(location);
    renderer = world.getAudioRenderer();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.