Thursday, June 17, 2010

read_window

Digital Signal Processing Library

Voice Lab

read_window


int read_window(int **window, int window_size,\
int data_length, int sample_rate, FILE *input_file)
{
int file_pos;
int i, data;

/* Read the next window */
for(i =0; i < window_size; i++) {
/* The read_25 routine takes into account the data width */
/* (in our case 2 bytes per INT) */
if(read_25(input_file, data_length, sample_rate, &data)\
< data_length) {
return(-1);
}
/* fill window array */
(*window)[i] = data;
}
print_window(&(**window), window_size);
return(0);
}


No comments:

Post a Comment