Class Samples

java.lang.Object
  extended by Samples

public class Samples
extends java.lang.Object

Class that represents a list of samples
Copyright Georgia Institute of Technology 2006

Author:
Timmy Douglas timmy@cc

Constructor Summary
Samples(Sound aSound)
          Constructor that takes a sound
 
Method Summary
 Sample getSample(int index)
          Method to get a specific Sample
static Sample[] getSamples(Sound aSound)
          Method to get the array of samples from a sound
 Sound getSound()
          Method to get these Samples' sound object
 void setSample(int index, double value)
          Method to set the value of a specific Sample
 void setSample(int index, int value)
          Method to set the value of a specific Sample
 java.lang.String toString()
          Obtains a string representation of this array of Samples.
 
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 sound

Parameters:
aSound - the sound
Method Detail

getSamples

public static Sample[] getSamples(Sound aSound)
Method to get the array of samples from a sound

Parameters:
aSound - the sound
Returns:
the array of samples

toString

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

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

getSample

public Sample getSample(int index)
Method to get a specific Sample

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

setSample

public void setSample(int index,
                      int value)
               throws SoundException
Method to set the value of a specific Sample

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
Method to set the value of a specific Sample

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

getSound

public Sound getSound()
Method to get these Samples' sound object

Returns:
a sound object