Instead of multiplying samples by a multiplier (like 2 or 0.5), try adding a value to them.
```
public void addAmount ( int amount )
{
SoundSample [ ] sampleArray = this . getSamples ( ) ;
// loop through the sample array
for ( SoundSample sample : sampleArray )
{
sample . setValue ( sample . getValue ( ) + amount ) ;
}
}
```
What happens to a sound if you add 100 to every sample? It still sounds the same. What happens if you add 1000 to every sample? It still sounds the same. The cycles are the same and adding 100 and 1000 doesn't do much to the volume.
You might also like to view...
Using the UML graphical notation for object classes, design the following object classes, identifying attributes and operations. Use your own experience to decide on the attributes and operations that should be associated with these objects.
• a messaging system on a mobile (cell) phone or tablet • a printer for a personal computer • a personal music system • a bank account • a library catalogue
Unsolicited e-mail messages are known as ____________________ or junk mail.
Fill in the blank(s) with the appropriate word(s).
________ refers to the digital coordination of an integrated plan stretching across geographical boundaries that may or may not result in bloodshed
Fill in the blank(s) with correct word
Which of the following is NOT a type of long-distance wireless two-way communication device?
A. Bluetooth B. CDMA C. 1Ganalog cellular phone D. 2G digital cell phone