1,885
edits
Changes
→Basic Sound Scale Program
## Creates 5,000,000 random "sound samples" in a data array (the number of samples is set in the <code>vol.h</code> file).
## Scales those samples by the volume factor 0.75 and stores them back to the data array.
## Sums the output array and prints the sum. '''(Why is this important?)'''
# Build and test this file.
#* Does it produce the same output each time?
# Test the performance of this program. '''Adjust the number of samples as necessary to get measurable results'''.
#* How long does it take to run the scaling?
#* How much time is spent scaling the sound samples? Be sure to eliminate the time taken for the non-scaling part of the program (e.g., random sample generation). '''(How will you do this?)'''
#* Do multiple runs take the same time? How much variation do you observe? What is the likely cause of this variation?
#* Is there any difference in the results produced by the various algorithms? How much does numeric accuracy matter in this application?