📄 updatewave.3
字号:
." Copyright (c) 1988, 1989, 1990 Entropic Speech, Inc.; All rights reserved.\" @(#)updatewave.3 1.9 27 Sep 1997 ESI.TH UPDATE_WAVES_GEN 3\-ESPSu 27 Sep 1997.ds ]W "\fI\s+4\ze\h'0.05'e\s-4\v'-0.4m'\fP\(*p\v'0.4m'\ Entropic Speech, Inc..SH NAME.nfupdate_waves_gen \- update waves-relevant generic header items record_freq and start_time.SH SYNOPSIS.ft B#include <esps/esps.h>.spvoid.brupdate_waves_gen(ih, oh, start, step).brstruct header *ih, *oh;.brfloat start, step;.sp.ft.SH DESCRIPTION.PPThis function is intended primarily for use by programs that producefiles that will be displayed using \fIxwaves\fP(1\-\s-1ESPS\s+1). Itwrites the generic header items which \fIwaves\fP+ requires in orderto properly display files in a time-synchronized manner, namely thegenerics "start_time" and "record_freq"..PPThe header pointers \fIih\fP and \fIoh\fP refer respectively to anESPS input file and an ESPS output file. These should both be FEAfiles, but for compatibility with previous versions, they can alsopoint to old-style SD files. .PPThe parameter \fIstart\fP is the starting record position in the inputfile that corresponds to the start of the output file (e.g., thestarting sample for FEA_SD or SD files). The parameter \fIstep\fP isthe number of input records that correspond to one output record. (if\fIstep\fP is 0, \fIupdate_waves_gen\fP does not compute and write"record_freq".) Although integer values for \fIstart\fP and\fIstep\fP are the most common case, they are n specified as FLOATs tohandle special cases (for example, \fIstep\fP will be less than 1 inthe case of a sampling rate increase)..PPWhen both \fIih\fP and \fIoh\fP both point to FEA headers (includingFEA_SD), \fIupdate_waves_gen\fP has the following behavior: It expectsto find the generic header items "start_time" and "record_freq" in theinput header \fIih\fP. If these are not present, they default to 0and 1 respectively. \fIUpdate_waves_gen\fP uses the generic"record_freq" and the parameter \fIstart\fP to compute a starting timerelative to the beginning of the file, it adds this value to the valueof the "start_time" generic in \fIih\fP, and it writes the result asthe "start_time" generic in \fIoh\fP. If "start_time" in \fIih\fP isa vector, the relative start time is added to each component beforethe results are written to \fIoh\fP. .PPIf \fIstep\fP is non-zero, the number of output records per second iscomputed by dividing the input generic "record_freq" with theparameter \fIstep\fP (this parameter gives the number of input recordsthat correspond to one output record). The resulting value is writtenas the generic "record_freq" in the output header. (For example, if\fIstep\fP == 1, the output "record_freq" is the same as that of theinput.) If \fIstep\fP is 0, then the header item "record_freq" is notwritten. Programs that output FEA_SD (or SD) files often use\fIstep\fP == 1 or \fIstep == 0\fP, in cases where they compute andset the sampling rate ("record_freq") outside of\fIupdate_waves_gen\fP..PPIf the input header \fIih\fP is an old-style SD header, the inputheader item \fIih->hd.sd->sf\fP is used instead of the generic"record_freq". If the output header \fIoh\fP is an an old-style SDheader, the output generic "record_freq" is not written, since it isassumed that the header item \fIoh->hd.sd->sf\fP is set correctly..PPNote that the generic header items written by \fIupdate_waves_gen\fPare not physically written to an output file until \fIwrite_header\fP(3\-\s-1ESPS\s+1) is called (\fIupdate_waves_gen\fP just modifies theheader structures)..SH DIAGNOSTICS.PPThe function exits with an assertion failure if \fIih\fP and \fIoh\fPdo not point to SD or FEA files, or if the input "record_freq" (or\fIih->hd.sd->sf\fP) is less than equal to zero. If \fIih\fP is a FEAfile and does not contain "record_freq" and "start_time" generics, awarning is printed on standard error if the global variabledebug_level is non-zero..SH BUGSNone known..SH SEE ALSO\fIadd_genhd\fP(3\-\s-1ESPS\s+1),\fIget_genhd_val\fP(3\-\s-1ESPS\s+1), .br\fIcopy_genhd\fP(3\-\s-1ESPS\s+1), \fIgenhd_type\fP(3\-\s-1ESPS\s+1),\fIgenhd_list\fP(3\-\s-1ESPS\s+1), .br\fIgenhd_codes\fP(3\-\s-1ESPS\s+1), ESPS(5\-ESPS), FEA(5\-\s-1ESPS\s+1), .brFEA_SD(5\-\s-1ESPS\s+1).SH AUTHORManual page by John Shore, code by Alan Parker and John Shore
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -