Sometimes people think that the way to increase volume is to add a value (like 1000) to every sample. Write the function fauxIncreaseVolume(sound, increment) to add an input value increment to every sample in an input sound. Try your function with an increment of 1000. Can you hear a difference in the sound? Why or why not?
What will be an ideal response?
```
def fauxIncreaseVolume(sound, increment):
for sample in getSamples(sound):
value = getSampleValue(sample)
setSampleValue(sample ,value+increment)
play(sound)
```
You cannot hear a real difference in the sound, as we perceive volume as the difference between values, not just the numeric value of the values.
You might also like to view...
The collection of websites that enable users to create user-generated content, connect, network, and share are called social ________
A) methods B) channels C) connections D) media
An environment consisting of a few interactive processes that communicate using shared memory.
For each of the following environments, suggest whether the UMA, NUMA or NORMA memory-access architecture would be best and explain why. What will be an ideal response?
Each ________ includes background colors, font styles, colors, effects, and slide layouts
Fill in the blank(s) with correct word
In G1 (S1) mode, the CPU stops _______________, but the power to the CPU and _______________ is maintained.
Fill in the blank(s) with the appropriate word(s).