Write a function to add 1 second of silence to the beginning of a sound. It should take the sound as input, create the new empty target sound, then copy the original sound starting after the first second in the target.
Note: The sampling rate has to be of type int if its going to work with index array notation.
```
def addStartSilence(sound):
sampleRate = int(getSamplingRate(sound))
target = makeEmptySound(sampleRate+getLength(sound))
targetSamples = getSamples(target)
sourceSamples = getSamples(sound)
for index in range(0, getLength(sound)):
sourceValue = getSampleValue(sourceSamples[index])
setSampleValue(targetSamples[sampleRate+index] ,sourceValue)
return target
```
You might also like to view...
Protected class members can be denoted in a UML diagram with the __________ symbol.
a. + b. - c. * d. #
Graph collections are organized in a parent/children relationship.
Answer the following statement true (T) or false (F)
Find the mode of the manufacturers of the cars driven to school by you and your classmates in this class.
A. Rolls Royce B. Aston Martin C. VAZ D. Daewoo E. none of these
Kurt, an administrator, configures a device that functions at the network layer, and also has 24 collision domains. Which of the following terms BEST describes this device?
A) VPN concentrator B) Wireless access point C) Multilayer switch D) Hub