Example usage for com.badlogic.gdx.audio Sound setPan

List of usage examples for com.badlogic.gdx.audio Sound setPan

Introduction

In this page you can find the example usage for com.badlogic.gdx.audio Sound setPan.

Prototype

public void setPan(long soundId, float pan, float volume);

Source Link

Document

Sets the panning and volume of the sound instance with the given id as returned by #play() or #play(float) .

Usage

From source file:com.saltosion.gladiator.util.Jukebox.java

License:Open Source License

/**
 * Play sound and set it's volume & pan
 *
 * @param sound//from w  ww .j av a 2s  .c o  m
 * @param volume 0-1f
 * @param pan ?
 * @return long returns sound's id
 */
public long playSound(Sound sound, float volume, float pan) {
    long id = playSound(sound);
    sound.setPan(id, pan, volume);
    return id;
}