getsdrec.3

来自「speech signal process tools」· 3 代码 · 共 107 行

3
107
字号
.\" Copyright (c) 1987-1990 Entropic Speech, Inc..\" Copyright (c) 1997 Entropic Research Laboratory, Inc. All rights reserved..\" @(#)getsdrec.3	1.3 18 Apr 1997 ESI/ERL.ds ]W (c) 1997 Entropic Research Laboratory, Inc..TH GET_SD_REC 3\-ESPSu 18 Apr 1997.SH NAME.nfget_sd_recd \- get data from an ESPS sampled-data file in DOUBLE formatget_sd_recf \- get data from an ESPS sampled-data file in FLOAT formatget_sd_recs \- get data from an ESPS sampled-data file in SHORT format.SH SYNOPSIS.ft B#include <esps/esps.h>.spint.brget_sd_recd(dbuf, nsmpls, hd, file).brdouble *dbuf;.brint nsmpls;.brstruct header *hd;.brFILE *file;.spint.brget_sd_recf(fbuf, nsmpls, hd, file).brfloat *fbuf;.brint nsmpls;.brstruct header *hd;.brFILE *file;.spint.brget_sd_recs(sbuf, nsmpls, hd, file).brshort *sbuf;.brint nsmpls;.brstruct header *hd;.brFILE *file;.ft.SH DESCRIPTION.PPThe.I get_sd_recfunctions attempt to read the next \fInsmpls\fP ESPS sampled-data records from stream \fIfile\fPinto the buffer pointed to by \fIdbuf\fP, \fIfbuf\fP, or \fIsbuf\fP,and they return the actual number of samples read.If no samples are read (end of file), zero is returned.The ESPS file header pointed to by \fIhd\fR is consulted for the typeof data in the file. The data is converted to double, float, orshort if necessary.If fewer than the requested \fInsmpls\fR points are read (becauseend of file is reached), \fIdbuf\fR, \fIfbuf\fR, or \fIsbuf\fRis zero-filled..PPThe 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_recs (3\-ESPSu),which should be used in all new programs..SH EXAMPLEdouble data[100];		/* room for 100 samples */.brhd = read_header(file);	/* read header */.brif ((get_sd_recd(data,100,hd,file) == 0) \fIeof or problem ... \fR.br.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 status 1..SH BUGSNone known..SH SEE ALSO.nfESPS(5\-ESPS), SD(5\-ESPS), FEA_SD(5\-ESPS),\fIget_sd_orecf\fP(3\-ESPSu), \fIget_sd_orecs\fP(3\-ESPSu),\fIget_sd_orecd\fP(3\-ESPSu), \fIget_feasd_recs\fP(3\-ESPS),\fIget_feasd_orecs\fP(3\-ESPS).fi.SH AUTHORAlan Parker

⌨️ 快捷键说明

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