GF4J 0.9.4 Beta

gameframe.engines
Class NullSample

java.lang.Object
  |
  +--gameframe.engines.NullSample
All Implemented Interfaces:
Sample, Sound

public class NullSample
extends java.lang.Object
implements Sample

A do nothing implementation of the sound object.

Since:
GameFrame for Java 0.9
Version:
GameFrame for Java 0.9.4
See Also:
gameframe.Sample

Field Summary
private  float m_pan
          The pan set by user.
private  float m_volume
          The volume set by user.
 
Constructor Summary
NullSample()
           
 
Method Summary
 void finalize()
          Does nothing.
 Sample getCopy()
          Returns a new do nothing implementation of a sound object.
 float getPan()
          Returns the stored pan.
 float getVolume()
          Returns the stored volume.
 boolean isPlaying()
          Returns always false.
 void playLooped()
          Does nothing.
 void playOnce()
          Does nothing.
 void setPan(float pan)
          Sets the pan of the sound.
 void setVolume(float volume)
          Sets the volume of the sound.
 void stop()
          Does nothing.
 
Methods inherited from class java.lang.Object
, clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

m_pan

private float m_pan
The pan set by user.

m_volume

private float m_volume
The volume set by user.
Constructor Detail

NullSample

public NullSample()
Method Detail

playOnce

public void playOnce()
Does nothing.
Specified by:
playOnce in interface Sound
Since:
GameFrame for Java 0.9

playLooped

public void playLooped()
Does nothing.
Specified by:
playLooped in interface Sound
Since:
GameFrame for Java 0.9

stop

public void stop()
Does nothing.
Specified by:
stop in interface Sound
Since:
GameFrame for Java 0.9

isPlaying

public boolean isPlaying()
Returns always false.
Specified by:
isPlaying in interface Sound
Returns:
False.
Since:
GameFrame for Java 0.9

setVolume

public void setVolume(float volume)
Sets the volume of the sound. The volume is not used anywhere, it is just stored so that it can be returned upon request.
Specified by:
setVolume in interface Sample
Parameters:
volume - The sounds volume.
Since:
GameFrame for Java 0.9

setPan

public void setPan(float pan)
Sets the pan of the sound. The pan is not used anywhere, it is just stored so that it can be returned upon request.
Specified by:
setPan in interface Sample
Parameters:
pan - The pan of the sound.
Since:
GameFrame for Java 0.9

getVolume

public float getVolume()
Returns the stored volume.
Specified by:
getVolume in interface Sample
Returns:
The sounds volume.
Since:
GameFrame for Java 0.9

getPan

public float getPan()
Returns the stored pan.
Specified by:
getPan in interface Sample
Returns:
The pan of the sound.
Since:
GameFrame for Java 0.9

getCopy

public Sample getCopy()
Returns a new do nothing implementation of a sound object.
Specified by:
getCopy in interface Sample
Returns:
Do nothing implementation of a sound object.
Since:
GameFrame for Java 0.9

finalize

public void finalize()
Does nothing.
Specified by:
finalize in interface Sound
Overrides:
finalize in class java.lang.Object
Since:
GameFrame for Java 0.9

GF4J 0.9.4 Beta