Final exam review Fall2007:Sound Manipulation
Help your fellow students here!
Back to Final Review-Fall 2007
public Sound reverse()
{
Sound target = new Sound(getLength());
int sampleValue;
for (int srcIndex=0,trgIndex=getLength()-1;
srcIndex getLength();
srcIndex++,trgIndex–)
{
sampleValue = this.getSampleValueAt(srcIndex);
target.setSampleValueAt(trgIndex,sampleValue);
};
return target;
}
Link to this Page