Package net.jsoundsystem.utils

Examples of net.jsoundsystem.utils.Vector3f


    soundFormat = format;
    soundData = data;
  }
 
  public void enableSpatializedSound(){
    source = new Vector3f();
    simulate3DEffect = true;
  }
View Full Code Here


      audioChannel.flush();
    }
  }

  private void update3DSound() {
    Vector3f listenerPosition = JSoundSystem.getListenerPosition();
    float distance = listenerPosition.getDistance(source);
   
        //Calculate how loud the sound is
    float newVolume = (JSoundSystem.maxDistance - distance) / JSoundSystem.maxDistance;
      if (newVolume <= 0) newVolume = 0;
View Full Code Here

   
    //Copy attributes
    copy.volume = this.volume;
    copy.looping = this.looping;
    copy.speed = this.speed;
    copy.source = new Vector3f(source);
   
    //Finished cloning
    return copy;
  }
View Full Code Here

TOP

Related Classes of net.jsoundsystem.utils.Vector3f

Copyright © 2018 www.massapicom. 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.