⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getsdorec.3

📁 speech signal process tools
💻 3
字号:
.\" Copyright (c) 1987-1990 Entropic Speech, Inc..\" Copyright (c) 1997 Entropic Research Laboratory, Inc. All rights reserved..\" @(#)getsdorec.3	1.6 18 Apr 1997 ESI/ERL.ds ]W (c) 1997 Entropic Research Laboratory, Inc..TH GET_SD_OREC 3\-ESPSu 18 Apr 1997.SH NAME.nfget_sd_orecd \- get overlapping data from an ESPS SD or FEA_SD file in DOUBLE formatget_sd_orecf \- get overlapping data from an ESPS SD or FEA_SD file in FLOAT formatget_sd_orecs \- get overlapping data from an ESPS SD or FEA_SD file in SHORT format.SH SYNOPSIS.ft B#include <esps/esps.h>.spint.brget_sd_orecd(dframebuf, framelen, nmove, first, hd, file).brdouble *dframebuf;.brint framelen;.brint nmove;.brint first;.brstruct header *hd;.brFILE *file;.spint.brget_sd_orecf(fframebuf, framelen, nmove, first, hd, file).brfloat *fframebuf;.brint framelen;.brint nmove;.brint first;.brstruct header *hd;.brFILE *file;.spint.brget_sd_orecs(sframebuf, framelen, nmove, first, hd, file).brshort *sframebuf;.brint framelen;.brint nmove;.brint first;.brstruct header *hd;.brFILE *file;.ft.SH DESCRIPTIONLike the.I get_sd_rec functions.RI ( get_sd_recd (3\-ESPS)etc.) the.I get_sd_orecfunctions read frames of sampled datafrom ESPS SD or single-channel FEA_SD files.However, while.I get_sd_recmoves a full frame length between calls, .I get_sd_orecmoves an arbitrary amount and is therefore suitable for useby programs that analyze overlapping frames.  .PPIf \fIfirst\fP==1, .I get_sd_orecattempts to read the next \fIframelen\fR ESPS sampled data file records(points) from stream \fIfile\fR into the buffer pointed to by\fIdframebuf\fR, \fIfframebuf\fR, or \fIsframebuf\fR, and it returns thenumber of valid samples in the buffer.  If the return value is less than\fIframelen\fR then the end of the input file has been reached.  If thereturn value is zero, then there are no valid samples in the buffer.  TheESPS file header pointed to by \fIhd\fR is consulted for the type of datain the file.  The data is converted to double, float, or short ifnecessary.  If fewer than the requested \fIframelen\fR points are read(because end of file is reached), \fIdframebuf\fR, \fIfframebuf\fR, or\fIsframebuf\fR is zero-filled..PPIf \fIfirst\fP==0, the contents of \fIdframebuf\fR, \fIfframebuf\fR, or\fIsframebuf\fR are assumed to contain the sampled data from the previouscall..I Get_sd_orecthen drops the first \fInmove\fP points, shifts the the remaining contents\fInmove\fP positions to the left (thinking of the zero-th element asleft-most), and then attempts to fill out the buffer by reading the next\fInmove\fP samples from \fIfile\fP.  It returns the number of validsamples in the buffer (including previous samples in the buffer and newones from the input file).  If the return value is less than \fIframelen\fRthen the end of the input file has been reached.  If the return value iszero, then there are no valid samples in the buffer (i.e.  nothing more canbe read from the input file and all samples have been shifted out of thebuffer).  The ESPS file header pointed to by \fIhd\fR is consulted for thetype of data in the file.  The data is converted to double, float, or shortif necessary.  If fewer than the requested \fIframelen\fR points are read(because end of file is reached), \fIdframebuf\fR, \fIfframebuf\fR, or\fIsframebuf\fR is zero-filled..PPIf \fIfirst\fP==0 and \fInmove\fP>=\fIframelen\fP, .I get_sd_orecignores the contents of \fIdframebuf\fR, \fIfframebuf\fR, or\fIsframebuf\fR, skips \fInmove\fP\-\fIframelen\fP points in \fIfile\fP,and then attempts to read the next \fIframelen\fP points \- i.e., afterskipping \fInmove\-framelen\fP points, it operates as in the case\fIfirst\fP==0 described above.  Note that, if \fInmove\fP==\fIframelen\fP,the net effect is for adjacent, non-overlapping frames (i.e., same as\fIget_sd_rec\fP)..PPThese functions can be called with \fInmove\fR == 0; they simply return\fIframelen\fR and the buffer is not altered..PP The file may be either an SD file (see.IR SD (5-\ESPS))or a.I single-channelFEA_SD file (see.IR FEA_SD (5\-ESPS)).These functions were originally written for use with the SD file type,which is being replaced with FEA_SD.Limited FEA_SD support is provided in these functionsto help in converting existing programsfrom using SD files to using FEA_SD files.More complete FEA_SD support is provided by the function.IR get_feasd_orecs (3-ESPSu),which should be used in all new programs..SH EXAMPLE.nfdouble data[100];		/* room for 100 samples */hd = read_header(file);	/* read header *//*read first 100 samples*/first = 1;if ((get_sd_orecd(data,100,50,first,hd,file) == 0)     error;else    .... /*process first frame*//*shift 50 points into file*/first = 0;if ((get_sd_orecd(data,100,50,first,hd,file) == 0)     error;else    .... /*process next frame*/.fi.SH DIAGNOSTICSIf \fIhd\fR does not point to the headerof an SD file or a single-channel FEA_SD file,then an error message is printed on stderr,and the program is terminated with exit status 1.In an SD file, if the header type information is not set,then an error message is printed on stderr,and the program is terminated with exit 1.If \fInmove\fP<0, the program exits with an assertion error..SH BUGSNone known..SH SEE ALSO.nfESPS(5\-ESPS), SD(5\-ESPS), FEA_SD(5-ESPS),\fIget_sd_recf\fP(3-ESPSu), \fIget_sd_recs\fP(3-ESPSu),\fIget_sd_recd\fP(3-ESPSu), \fIget_feasd_recs\fP(3-ESPS),\fIget_feasd_orecs\fP(3-ESPS).fi.SH AUTHORManual page by John Shore.brFunctions by Alan Parker

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -