Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Last person forgot the delay for the source file Expert G8A 12. 20 Points) Write

ID: 3919708 • Letter: L

Question


Last person forgot the delay for the source file Expert G8A 12. 20 Points) Write a block processing C language function called echo that implements the system shown below and a function called echolnit to initialize the algorithm Delay Assume that the input x, output y, and gain G are all in Q15 format and that the maximum possible value of the delay no is 32,000 samples. The function echolnit does not return any value and does not have any inputs. The function echo does not return any value, and the inputs to the function are as follows (in this order) x-pointer to the input buffer (type pointer to Int16 . y-pointer to the output buffer (type pointer to Int16) N-size of input and output buffers (type Int16) no-delay in number of samples (type Int16) G-gain (type Int16) a. Write the contents of the header file echo.h

Explanation / Answer

SOLUTION:

According to the given data the following code is given

CODE:

//echo.h

#ifndef ECHO_H
#define ECHO_H
void echo(int16_t *, int16_t *, int16_t , int16_t , int16_t )
void echoInit();

#endif

//echo.c

#include<stdio.h>

#include"echo.h"

void echo(int16_t *x, int16_t *y, int16_t N, int16_t nO, int16_t G )

{

y[N] = x[N] + G*x[N-nO];

}

void echoInit()

{

//initialize values for x,y,N,nO and G here

}