📄 prnt_hdr.c.old
字号:
(void) printf("synt_interp: invalid code %d\n",(int)h->synt_interp); tab(indent); if(idx_ok(h->synt_pwr,synt_inter_methods)) (void) printf("synt_pwr: %s\n",synt_pwr_codes[h->synt_pwr]); else (void) printf("synt_pwr: invalid code %d\n",(int)h->synt_pwr); tab(indent); if(idx_ok(h->synt_rc,synt_inter_methods)) (void) printf("synt_rc: %s\n",synt_ref_methods[h->synt_rc]); else (void) printf("synt_rc: invalid code %d\n",(int)h->synt_rc); tab(indent); (void) printf("synt_order: %d\n",(int)h->synt_order); for (i=0; i<SD_SPARES; i++) if (h->spares[i] != 0) { tab(indent); (void) printf("spares[%d]: 0x%x\n", i,(int) h->spares[i]); } pr_zfunc(indent,"prefilter",h->prefilter); pr_zfunc(indent,"de_emp",h->de_emp); return;}voidprint_spec(indent, hdr)int indent;struct header *hdr;{ int i; struct spec_header *h = hdr->hd.spec; printf("\n"); tab(indent); (void) printf("---Spectral File Header---\n"); tab(indent); (void) printf("start: %ld, nan: %ld, frmlen: %d\n", h->start, h->nan, (int)h->frmlen); tab(indent); (void) printf("order_vcd: %d, order_unvcd: %d\n", (int)h->order_vcd, (int)h->order_unvcd); tab(indent); if(idx_ok(h->win_type,win_type_codes)) (void) printf("win_type: %s\n",win_type_codes[h->win_type]); else (void) printf("win_type: invalid code %d\n",(int)h->win_type); tab(indent); (void) printf("sf: %g\n",h->sf); tab(indent); if(idx_ok(h->spec_an_meth,spec_an_methods)) (void) printf("spec_an_meth: %s\n",spec_an_methods[h->spec_an_meth]); else (void) printf("spec_an_meth: invalid code %d\n",(int)h->spec_an_meth); tab(indent); (void) printf("dcrem: %g\n",h->dcrem); tab(indent); if(idx_ok(h->post_proc,post_proc_codes)) (void) printf("post_proc: %s\n",post_proc_codes[h->post_proc]); else (void) printf("post_proc: invalid code %d\n",(int)h->post_proc); tab(indent); if(idx_ok(h->frame_meth,frame_methods)) (void) printf("frame_meth: %s\n",frame_methods[h->frame_meth]); else (void) printf("frame_meth: invalid code %d\n",(int)h->frame_meth); tab(indent); (void) printf("voicing: %d\n",h->voicing); tab(indent); if(idx_ok(h->freq_format,freq_format_codes)) (void) printf("freq_format: %s\n",freq_format_codes[h->freq_format]); else (void) printf("freq_format: invalid code %d\n",(int)h->freq_format); tab(indent); if(idx_ok(h->spec_type,spec_type_codes)) (void) printf("spec_type: %s\n",spec_type_codes[h->spec_type]); else (void) printf("spec_type: invalid code %d\n",(int)h->spec_type); tab(indent); (void) printf("contin: %d, num_freqs: %ld\n",(int)h->contin, h->num_freqs); for (i=0; i<SPEC_SPARES; i++) if (h->spares[i] != 0) { tab(indent); (void) printf("spares[%d]: 0x%x\n", i,(int) h->spares[i]); } pr_zfunc(indent,"pre_emp",h->pre_emp); if(h->freqs) { int j=6; for(i=0; i<h->num_freqs; i++) { if(j>5) { tab(indent); printf("freqs[%d]: ",i); j=0; } printf("%10.4f",h->freqs[i]); j++; } } return;}voidprint_ros(indent, hdr)int indent;struct header *hdr;{ int i,order; struct ros_header *h = hdr->hd.ros; printf("\n"); tab(indent); (void) printf("---Rosetta Speech Frame (ROS) Header---\n"); tab(indent); (void) printf("start: %ld, order_vcd: %d, order_unvcd: %d, ", h->start,h->order_vcd,h->order_unvcd); tab(indent); if(idx_ok(h->q_method,quant_methods)) (void) printf("q_method: %s\n",quant_methods[h->q_method]); else (void) printf("q_method: invalid code %d\n",(int)h->q_method); tab(indent); if(idx_ok(h->tf_method,ros_tf_method)) (void) printf("tf_method: %s\n",ros_tf_method[h->tf_method]); else (void) printf("tf_method: invalid code %d\n",(int)h->tf_method); if(idx_ok(h->piq_method,quant_methods)) (void) printf("piq_method: %s\n",quant_methods[h->piq_method]); else (void) printf("piq_method: invalid code %d\n",(int)h->piq_method); tab(indent); if(idx_ok(h->rcq_method,quant_methods)) (void) printf("rcq_method: %s\n",quant_methods[h->rcq_method]); else (void) printf("rcq_method: invalid code %d\n",(int)h->rcq_method); tab(indent); if(idx_ok(h->pwq_method,quant_methods)) (void) printf("pwq_method: %s\n",quant_methods[h->pwq_method]); else (void) printf("pwq_method: invalid code %d\n",(int)h->pwq_method); tab(indent); (void) printf("src_sf: %f, maxtype: %d, maxpulses: %d, maxpow: %d\n", h->src_sf,h->maxtype,h->maxpulses,h->maxpow); tab(indent); (void) printf("rms_fullscale: %g, ",h->rms_fullscale); tab(indent); (void) printf("frmlen_bits: %d\n",h->frmlen_bits); for (i=0; i<ROS_SPARES; i++) if (h->spares[i] != 0) { tab(indent); (void) printf("spares[%d]: 0x%x\n", i,(int) h->spares[i]); } tab(indent); if(h->maxtype != 0) { int j=16; for(i=0; i<h->maxtype; i++) { if(j>9) { tab(indent); (void) printf("\ntype_bits[%d]: ",i); j=0; } (void) printf("%5d",h->type_bits[i]); j++; } } order = h->order_unvcd; if(order != 0) { int j=16; for(i=0; i<order; i++) { if(j>9) { tab(indent); (void) printf("\nrc_ubits[%d]: ",i); j=0; } (void) printf("%5d",h->rc_ubits[i]); j++; } } order = h->order_vcd; if(order != 0) { int j=16; for(i=0; i<order; i++) { if(j>9) { tab(indent); (void) printf("\nrc_vbits[%d]: ",i); j=0; } (void) printf("%5d",h->rc_vbits[i]); j++; } } if(h->maxpulses != 0) { int j=16; for(i=0; i<h->maxpulses; i++) { if(j>9) { tab(indent); (void) printf("\npulse_bits[%d]: ",i); j=0; } (void) printf("%5d",h->pulse_bits[i]); j++; } } if(h->maxpow != 0) { int j=16; for(i=0; i<h->maxpow; i++) { if(j>9) { tab(indent); (void) printf("\npow_bits[%d]: ",i); j=0; } (void) printf("%5d",h->pow_bits[i]); j++; } } (void)printf("\n"); return;}voidprint_filt(indent,hdr)int indent;struct header *hdr;{ int i,n; struct filt_header *h = hdr->hd.filt; printf("\n"); tab(indent); (void) printf("---Filter Coefficient File---\n"); tab(indent); (void) printf("max_num: %d, max_den: %d\n",h->max_num,h->max_den); tab(indent); if(idx_ok(h->func_spec,filt_func_spec)) (void) printf("func_spec: %s\n",filt_func_spec[h->func_spec]); else (void) printf("func_spec: invalid code %d\n",h->func_spec); tab(indent); printf("nbands: %d, npoints: %d, g_size: %d, nbits: %d\n", h->nbands,h->npoints,h->g_size,h->nbits); tab(indent); printf("type: %d, method: %d\n",h->type,h->method); tab(indent); for (i=0; i<FILT_SPARES; i++) if (h->spares[i] != 0) { tab(indent); (void) printf("spares[%d]: 0x%x\n", i,(int) h->spares[i]); } if(h->nbands != 0) { int j=6; for(i=0; i<h->nbands; i++) { if(j>5) { tab(indent); (void) printf("\nbandedges[%d]: ",i); j=0; } (void) printf("%g ",h->bandedges[i]); j++; } } (void)printf("\n"); if(h->npoints != 0) { int j=6; for(i=0; i<h->npoints; i++) { if(j>5) { tab(indent); (void) printf("\npoints[%d]: ",i); j=0; } (void) printf("%g ",h->points[i]); j++; } } (void)printf("\n"); if(h->func_spec == BAND) n = h->nbands; else n = h->npoints; if(n != 0) { int j=6; for(i=0; i<n; i++) { if(j>5) { tab(indent); (void) printf("\ngains[%d]: ",i); j=0; } (void) printf("%g ",h->gains[i]); j++; } } (void)printf("\n"); if(n != 0) { int j=6; for(i=0; i<n; i++) { if(j>5) { tab(indent); (void) printf("\nwts[%d]: ",i); j=0; } (void) printf("%g ",h->wts[i]); j++; } } (void)printf("\n"); return;}voidprint_scbk(indent,hdr)int indent;struct header *hdr;{ int i; struct scbk_header *h = hdr->hd.scbk; printf("\n"); tab(indent); (void) printf("---Scaler Codebook File---\n"); tab(indent); (void) printf("num_items: %ld, num_cdwds: %d\n", h->num_items,h->num_cdwds); tab(indent); (void) printf("convergence: %f, element_num: %d\n", h->convergence,h->element_num); tab(indent); if(idx_ok(h->distortion,scbk_distortion)) (void) printf("distortion: %s\n",scbk_distortion[h->distortion]); else (void) printf("distortion: invalid code %d\n",h->distortion); tab(indent); if(idx_ok(h->codebook_type,scbk_codebook_type)) (void) printf("codebook_type: %s\n",scbk_codebook_type[h->codebook_type]); else (void) printf("codebook_type: invalid code %d\n",h->codebook_type); for (i=0; i<SCBK_SPARES; i++) if (h->spares[i] != 0) { tab(indent); (void) printf("spares[%d]: 0x%x\n", i,(int) h->spares[i]); }}voidprint_fea(indent,hdr)int indent;struct header *hdr;{ int i,j; struct fea_header *h = hdr->hd.fea; printf("\n"); tab(indent); (void) printf("---Feature File Header---\n"); tab(indent); printf("fea_type: %d, segment_labeled: %d, field_count: %d\n", h->fea_type, h->segment_labeled, h->field_count); for (i=0; i<h->field_count; i++) { tab(indent); printf("Item name: %s, ",h->names[i]); tab(indent); if(idx_ok(h->types[i],type_codes)) printf("type: %s, ",type_codes[h->types[i]]); else printf("type: invalid code: %d, ",h->types[i]); tab(indent); printf("size: %ld, rank: %d\n",h->sizes[i],h->ranks[i]); if(h->ranks[i] > 1) { tab(indent); printf(" Dimensions: "); for(j=0; j<h->ranks[i]; j++) printf("% ld",h->dimens[i][j]); printf("\n"); } if (h->types[i] == CODED) { char **s; tab(indent); printf(" Possible coded values:\n"); s = h->enums[i]; while(*s != NULL) { tab(indent); printf(" %s\n",*s++); } } } for (i=0; i<FEA_SPARES; i++) if (h->spares[i] != 0) { tab(indent); (void) printf("spares[%d]: 0x%x\n", i,(int) h->spares[i]); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -