Code:
public void increaseVolume2()
{
SoundSample[] sampleArray = this.getSamples();
SoundSample sample = null;
int value = 0;
//loop through all the samples in the array
for (int i = 0; i < sampleArray.length; i++)
{
sample = sampleArray[i];
value = sample.getValue();
sample.setValue((int) (value * 2));
}
}
Comment