// file: $SPEECH_HOMEWORK4/hw4/class/signal_noise_ratio/v1.0/snr_dbg_0.cc // // isip include files // #include "signal_noise_ratio.h" #include "signal_noise_ratio_constants.h" // method: debug_cc // // arguments: // FILE* fp: (input) a open file pointer // char_1* message: (input) identification message // // return: a logical_1 value indicating the status // logical_1 Signal::debug_cc(FILE* fp_a, char_1* message_a) { // dump internal data // // param file info // if (param_file_d == (char_1*)NULL) { fprintf(fp_a, "<%s::%s> param_file_d = NULL\n", SIGNAL_CLASS_NAME, (char*)message_a); } else { fprintf(fp_a, "<%s::%s> param_file_d = %s\n", SIGNAL_CLASS_NAME, (char*)message_a, param_file_d); } // input file info // if (input_file_d == (char_1*)NULL) { fprintf(fp_a, "<%s::%s> input_file_d = NULL\n", SIGNAL_CLASS_NAME, (char*)message_a); } else { fprintf(fp_a, "<%s::%s> input_file_d = %s\n", SIGNAL_CLASS_NAME, (char*)message_a, input_file_d); } // output file info // if (output_file_d == (char_1*)NULL) { fprintf(fp_a, "<%s::%s> output_file_d = NULL\n", SIGNAL_CLASS_NAME, (char*)message_a); } else { fprintf(fp_a, "<%s::%s> output_file_d = %s\n", SIGNAL_CLASS_NAME, (char*)message_a, output_file_d); } // number of channels // fprintf(fp_a, "<%s::%s> num_chans_d = %ld\n", SIGNAL_CLASS_NAME, (char*)message_a, num_chans_d); // number of bytes // fprintf(fp_a, "<%s::%s> num_bytes_d = %ld\n", SIGNAL_CLASS_NAME, (char*)message_a, num_bytes_d); // sample frequency // fprintf(fp_a, "<%s::%s> sample_freq_d = %f\n", SIGNAL_CLASS_NAME, (char*)message_a, sample_freq_d); // signal threshold // fprintf(fp_a, "<%s::%s> signal_threshold_d = %f\n", SIGNAL_CLASS_NAME, (char*)message_a, signal_threshold_d); // noise threshold // fprintf(fp_a, "<%s::%s> noise_threshold_d = %f\n", SIGNAL_CLASS_NAME, (char*)message_a, noise_threshold_d); // frame duration // fprintf(fp_a, "<%s::%s> frame_duration_d = %f\n", SIGNAL_CLASS_NAME, (char*)message_a, frame_duration_d); // window duration // fprintf(fp_a, "<%s::%s> window_duration_d = %f\n", SIGNAL_CLASS_NAME, (char*)message_a, window_duration_d); // window method // fprintf(fp_a, "<%s::%s> window_method_d = %ld\n", SIGNAL_CLASS_NAME, (char*)message_a, window_method_d); // pre_emphasize // fprintf(fp_a, "<%s::%s> pre_emphasize_d = %d\n", SIGNAL_CLASS_NAME, (char*)message_a, pre_emphasize_d); // exit gracefully // return ISIP_TRUE; }