It is me again, with some update on my coding adventure. It took me a long time but I am now able to update my progress on my SPO600 lab 4.

This is my objective, that I copied from the Lab4 page:

+Build and test this file.

Does it produce the same output each time?

+Test the performance of this program.

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).

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?

So first of all, I extract the whole file, just as I should

Then I started running the test to see the run time for it.

I realize it gave the same result 94. After I Pre-calculate a lookup table (array) of all possible sample values multiplied by the volume factor, and look up each sample in that table to get the scaled values. This is what I got.

And here, I convert the volume factor 0.75 to a fix-point integer by multiplying by a binary number representing a fixed-point value “1”.

Overall, this lab gave me a chance to practice with alternative methods for my coding experience, I will update more with my lab 5 progress. Thanks for reading.