// file: $SPEECH_HOMEWORK4/hw4/class/snr_ratio/v1.0/snr_find_0.cc // // isip include files // #include "signal_noise_ratio.h" #include "signal_noise_ratio_constants.h" // method: find_range_cc // // arguments: // float_4** energy (input) the energy data // int_4 num_energy (input) the number of energy // float_4* min (output) minimum value of energy // float_4* max (output) maximum value of energy // // return: a logical_1 indicating status // logical_1 Signal::find_range_cc (float_4** energy_a, int_4 num_energy_a, float_4* min_a, float_4* max_a) { // check arguments // if (energy_a == (float_4**)NULL) { error_handler_cc((char_1*)"find_range_cc", (char_1*)"input data is empty"); } // loop over all channels // for (int_4 channel=0;channel < num_chans_d; channel++) { min_a[channel] = energy_a[0][channel]; max_a[channel] = energy_a[0][channel]; // loop over all samples // for (int_4 sample=1;sample max_a[channel]) { max_a[channel] = n; } } } // exit gracefully // return ISIP_TRUE; }