// file: clpc_file_1.cc // // this function prints the content of the buffer // // system include file // #include #include // local include file // #include "global_constants.h" #include "calculate_lpc_constants.h" #include "calculate_lpc.h" // function: read_signal_cc // // arguments: // float** buffer_a: (input) an array buffer // int num_chans_a: (input) number of channels // int num_items_a: (input) number of items per channel // float sample_freq_a: (input) sampling frequency // // return: an int to indicate status // // this function prints the content of a buffer // // int print_buffer_cc (float** buffer_a, int num_chans_a, int num_items_a, float sample_freq_a) { int num_samples = num_items_a * num_chans_a; float freq_scaling = sample_freq_a / num_items_a; for (int chan = 0; chan < num_chans_a; chan++) { for (int sample = 0; sample < num_samples; sample++) { fprintf(stdout, "%.4f %.4f\n", freq_scaling * sample, 20 * log10(buffer_a[chan][sample])); } } fprintf(stdout, "\n"); // exit gracefully // return TRUE; }