Changes

Jump to: navigation, search

SPO600 Algorithm Selection Lab

37 bytes added, 11:26, 9 March 2020
Three Approaches
[[Category:SPO600 Labs]]{{Admon/lab|Purpose of this Lab|In this lab, you will investigate the impact of different algorithms which produce the same effect. You will test and select one of three algorithms for adjusting the volume of PCM audio samples based on benchmarking.}}
== Lab 4 6 ==
=== Background ===
Three approaches to this problem are provided:
# The basic or Naive algorithm (<code>vol1.c</code>). This approach multiplies each sound sample by 0.75, casting from signed 16-bit integer to floating point and back again, which . Casting between integer and floating point can be [[Expensive|expensive]] operations.
# A lookup-based algorithm (<code>vol2.c</code>). This approach uses a pre-calculated table of all 65536 possible results, and looks up each sample in that table instead of multiplying.
# A fixed-point algorithm (<code>vol3.c</code>). This approach uses fixed-point math and bit shifting to perform the multiplication without using floating-point math.

Navigation menu