
de.lessvoid.nifty.sound.openal.slick.NullAudio Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nifty-openal-soundsystem Show documentation
Show all versions of nifty-openal-soundsystem Show documentation
This is an OpenAL/lwjgl based SoundDevice for Nifty GUI. It was extracted out of Slick2D to be
independent of the whole Slick2D library and to be used with none Slick2D based renderes. All credits for the
original code go to Kevin Glass and all Slick2D contributers.
The newest version!
package de.lessvoid.nifty.sound.openal.slick;
/**
* A null implementation used to provide an object reference when sound
* has failed.
*
* @author kevin
*/
public class NullAudio implements Audio {
/**
* @see org.newdawn.slick.openal.Audio#getBufferID()
*/
@Override
public int getBufferID() {
return 0;
}
/**
* @see org.newdawn.slick.openal.Audio#getPosition()
*/
@Override
public float getPosition() {
return 0;
}
/**
* @see org.newdawn.slick.openal.Audio#isPlaying()
*/
@Override
public boolean isPlaying() {
return false;
}
/**
* @see org.newdawn.slick.openal.Audio#playAsMusic(float, float, boolean)
*/
@Override
public int playAsMusic(float pitch, float gain, boolean loop) {
return 0;
}
/**
* @see org.newdawn.slick.openal.Audio#playAsSoundEffect(float, float, boolean)
*/
@Override
public int playAsSoundEffect(float pitch, float gain, boolean loop) {
return 0;
}
/**
* @see org.newdawn.slick.openal.Audio#playAsSoundEffect(float, float, boolean, float, float, float)
*/
@Override
public int playAsSoundEffect(
float pitch, float gain, boolean loop,
float x, float y, float z) {
return 0;
}
/**
* @see org.newdawn.slick.openal.Audio#setPosition(float)
*/
@Override
public boolean setPosition(float position) {
return false;
}
/**
* @see org.newdawn.slick.openal.Audio#stop()
*/
@Override
public void stop() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy