Class Samples

java.lang.Object
  extended by Samples

public class Samples
extends java.lang.Object

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


Constructor Summary
Samples(Sound aSound)
          Constructor that takes a file name
 
Method Summary
 Sample getSample(int index)
          gets item
static Sample[] getSamples(Sound aSound)
           
 Sound getSound()
          get sound object
 void setSample(int index, double value)
          sets item
 void setSample(int index, int value)
          sets item
 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

Samples

public Samples(Sound aSound)
Constructor that takes a file name

Parameters:
aSound - the name of the file to read the sound from
Method Detail

getSamples

public static Sample[] getSamples(Sound aSound)
Parameters:
aSound - the name of the file to read the sound from
Returns:
samples

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.

getSample

public Sample getSample(int index)
gets item

Parameters:
index - the index to get the sample
Returns:
a sample

setSample

public void setSample(int index,
                      int value)
               throws SoundException
sets item

Parameters:
index - the index to get the sample
value - the value to set it to
Throws:
SoundException

setSample

public void setSample(int index,
                      double value)
               throws SoundException
sets item

Parameters:
index - the index to get the sample
value - the value to set it to
Throws:
SoundException

getSound

public Sound getSound()
get sound object

Returns:
a sound object