
46 CHAPTER 3. FIR DIGITAL FILTERS
The five real-time steps involved in brute-force FIR filtering
An explanation of Listing 3.4 follows.
1. (Line 2): The most current sample from the ADC side of the codec is assigned to the
current input array element, xLeft[0].
2. (Line 3): The current output of this filter is given the name yLeft. Since this same
variable will be used in the calculation of each output value of the filter, it must be
reinitialized to zero before each dot product is performed.
3. (Lines 5–7): These 3 lines of code perform the dot product of x and B. The equivalent
operation is,
yLeft = xLeft[0]B[0] + xLeft[−1]B[1] + xLeft[−2]B[2] + xLeft