Tabnine Logo
Sound.setVolume
Code IndexAdd Tabnine to your IDE (free)

How to use
setVolume
method
in
com.badlogic.gdx.audio.Sound

Best Java code snippets using com.badlogic.gdx.audio.Sound.setVolume (Showing top 13 results out of 315)

origin: libgdx/libgdx

  public void changed (ChangeEvent event, Actor actor) {
    sound.setVolume(soundId, volume.getValue());
    volumeValue.setText("" + volume.getValue());
  }
});
origin: nifty-gui/nifty-gui

@Override
public void setVolume(final float volume) {
 currentVolume = volume;
 sound.setVolume(soundId, volume);
}
origin: com.github.nifty-gui/nifty-libgdx-renderer

@Override
public void setVolume(final float volume) {
 currentVolume = volume;
 sound.setVolume(soundId, volume);
}
origin: manuelbua/uracer-kotd

@Override
public void gamePause () {
  super.gamePause();
  if (driftId > -1) {
    drift.setVolume(driftId, 0f);
  }
}
origin: manuelbua/uracer-kotd

private void setVolume (int track, float volume) {
  float v = MathUtils.clamp(volume, 0, 1);
  lastVolume[track] = v;
  music[track].setVolume(mid[track], v);
}
origin: manuelbua/uracer-kotd

@Override
public void gameResume () {
  super.gameResume();
  if (hasPlayer && driftId > -1) {
    drift.setVolume(driftId, player.driftState.driftStrength * lastVolume);
  }
}
origin: manuelbua/uracer-kotd

private void start (int track) {
  if (started[track]) {
    return;
  }
  started[track] = true;
  mid[track] = loop(music[track], 0);
  music[track].setVolume(mid[track], 0);
}
origin: manuelbua/uracer-kotd

protected void setVolume (int track, float vol) {
  engine[track].setVolume(mid[track], vol * getGlobalVolume() * SoundManager.SfxVolumeMul);
  volumes[track] = vol;
}
origin: manuelbua/uracer-kotd

private void onBeginDrift () {
  if (driftId > -1) {
    drift.stop(driftId);
    driftId = drift.loop(0f);
    drift.setVolume(driftId, 0f);
  }
  doFadeIn = true;
  doFadeOut = false;
}
origin: jmrapp1/SpaceInvaders

public Sound loopSound(String id, float volume) {
  Sound sound = getSound(id);
  if (sound != null) {
    long songId = sound.loop();
    sound.setVolume(songId, volume);
  }
  return sound;
}
 
origin: jmrapp1/SpaceInvaders

public void playSound(String id, float volume) {
  Sound sound = getSound(id);
  if (sound != null) {
    long songId = sound.play();
    sound.setVolume(songId, volume);
  }
}
 
origin: manuelbua/uracer-kotd

private void start () {
  if (started) {
    return;
  }
  started = true;
  driftId = loop(drift, 0f);
  drift.setPitch(driftId, pitchMin);
  drift.setVolume(driftId, 0f);
}
origin: manuelbua/uracer-kotd

drift.setVolume(driftId, player.driftState.driftStrength * lastVolume * 1.0f * SoundManager.SfxVolumeMul);
com.badlogic.gdx.audioSoundsetVolume

Javadoc

Changes the volume of the sound instance with the given id as returned by #play() or #play(float). If the sound is no longer playing, this has no effect.

Popular methods of Sound

  • play
    Plays the sound. If the sound is already playing, it will be played again, concurrently.
  • stop
    Stops the sound instance with the given id as returned by #play() or #play(float). If the sound is n
  • dispose
    Releases all the resources.
  • loop
    Plays the sound, looping. If the sound is already playing, it will be played again, concurrently. Yo
  • pause
    Pauses the sound instance with the given id as returned by #play() or #play(float). If the sound is
  • resume
    Resumes the sound instance with the given id as returned by #play() or #play(float). If the sound is
  • setPitch
    Changes the pitch multiplier of the sound instance with the given id as returned by #play() or #play
  • setPan
    Sets the panning and volume of the sound instance with the given id as returned by #play() or #play(
  • setLooping
    Sets the sound instance with the given id to be looping. If the sound is no longer playing this has

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • getApplicationContext (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Permission (java.security)
    Legacy security code; do not use.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now