Class Sample

java.lang.Object
  extended by Sample

public class Sample
extends java.lang.Object

Class that represents a sample. this is for JES, and arrays are 1-index Copyright Georgia Institute of Technology 2006


Constructor Summary
Sample(Sound aSound, int index)
          Constructor that takes a file name
 
Method Summary
 Sound getSound()
          get sound object
 int getValue()
          get sample value
 void setValue(double newValue)
          get sample value
 void setValue(int newValue)
          get sample value
 java.lang.String toString()
          Obtains a string representation of this JavaSound.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Sample

public Sample(Sound aSound,
              int index)
Constructor that takes a file name

Parameters:
aSound - the sound
index - the index
Method Detail

toString

public java.lang.String toString()
Obtains a string representation of this JavaSound.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this JavaSound.

getSound

public Sound getSound()
get sound object

Returns:
a sound object

getValue

public int getValue()
             throws SoundException
get sample value

Returns:
a sample value
Throws:
SoundException

setValue

public void setValue(int newValue)
              throws SoundException
get sample value

Parameters:
newValue - the new value to store
Throws:
SoundException

setValue

public void setValue(double newValue)
              throws SoundException
get sample value

Parameters:
newValue - the new value to store
Throws:
SoundException