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

📄 scbkrec.3

📁 speech signal process tools
💻 3
字号:
.\" Copyright (c) 1987 Entropic Speech, Inc.; All rights reserved.\" @(#)scbkrec.3	1.3 06 May 1997 ESI.TH SCBK_REC 3\-ESPSu 06 May 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.nfallo_scbk_rec \- allocate memory for SCBK file recordget_scbk_rec \- get the next data record from an ESPS SCBK data fileprint_scbk_rec \- print an ESPS SCBK data recordput_scbk_rec \- put an ESPS SCBK data record onto the file.SH SYNOPSIS.ft B#include <esps/scbk.h>.brstruct scbk_data *.brallo_scbk_rec(hd).brstruct header *hd;.sp.br#include <esps/scbk.h>.brint.brget_scbk_rec(data, hd, file).brstruct scbk_data *data;.brstruct header *hd;.brFILE *file;.sp.brvoid.brprint_scbk_rec(data, hd, file).brstruct scbk_data *data;.brstruct header *hd;.brFILE *file;.sp.br#include <esps/scbk.h>.brvoid.brput_scbk_rec(data, hd, file).brstruct scbk_data *data;.brstruct header *hd;.brFILE *file;.ft.SH DESCRIPTION.I allo_scbk_recallocates memory for an SCBK file record and returns a pointer to it.The number of elements allocated to\fIcswd_dist\fR, \fIfinal_pop\fR, and \fIqtable\fR is given by theheader item \fIhd.scbk\->num_cdwds\fR.Since the size of the allocated record depends on a value in the data fileheader, it is important to be sure that a given SCBK record is consistent with the header of the file it is being used with.The SCBKdata read/write routines use this same value in the header to determinethe amount of data to read or write.A mismatch could cause the program to fail in unpredictable ways.It is possible to allocate only one record, for both input and output, if the programmer is certain that thevalue of \fIhd.scbk\->num_cdwds\fRis the same in both the input and output files.If the record is being allocated for a new file (to be written), then\fIhd.scbk\->num_cdwds\fR in the new header(after \fInew_header\fR(3\-ESPSu)) must be filled in before calling .I allo_scbk_rec..PP.I get_scbk_recreads the next SCBK record from stream \fIfile\fR into the data structurepointed to by \fIdata\fR.The ESPS file header pointed to by \fIhd\fRis consulted for the value of \fIhd.scbk->num_cdwds\fR.This value determines the size of the data record.   See the caution on \fIallo_scbk_rec\fR.EOF is returned upon end of file.A positive non-zero value is returned otherwise..PP.I print_scbk_recordprints the SCBK record pointed to by \fIdata\fR onto the stream \fIfile\fR.The ESPS header pointed to by \fIhd\fRis consulted for the value of \fIhd.scbk->num_cdwds\fR.This value determines the size of the data record.See the caution on \fIallo_scbk_rec\fR.This function is useful for debug output in programs whichprocess SCBK data files..PP.I put_scbk_recwrites an SCBK data record pointed to by \fIdata\fR onto the stream\fIfile\fR, which should be an open ESPS SCBK file.The header must be written out to the SCBK file before calling this function.The ESPS file header pointed to by \fIhd\fRis consulted for the value of \fIhd.scbk\->num_cdwds\fR.This value determines the size of the data record.See the caution on \fIallo_scbk_rec\fR..SH EXAMPLE.if n .ta 33.if t .ta 3istruct scbk_data *p;	.brstruct header *ih;.brih = read_header(file);	/* read scbk file header */.brp = allo_scbk_rec(ih);	/* allocate record */.brif(get_scbk_rec(p,ih,file) == EOF) \fIeof...\fR	/* read a record */.brx = p\->final_dist;	/* record reference */.br(void) print_scbk_record(p,ih,stderr)	/* print the record */.sp.brstruct header *oh;.broh = new_header(FT_SCBK);	/* create file header */.br\fI ... fill in some values, including hd.scbk->num_cdwds...\fR.br(void) write_header(oh,file);	/* write out header */.brp = allo_scbk_rec(oh);	/* allocate record */.br\fI ... fill in desired data record values...\fR.br(void) put_scbk_rec(p,oh,file);	/* write data record */.SH DIAGNOSTICSIf \fIhd\fR does not point to a SCBK header then a message is printedon stderr and the program terminates with exit 1.If the value of \fIhd.scbk\->num_cdwds\fR is less than 1,a message is printed on stderr and the program terminates with exit 1.If an I/O error occurs during write in.I put_scbk_rec,a message is output to standard error and the program exits with status 1..SH BUGSNone known..SH SEE ALSOeopen(3\-ESPSu),read_header(3\-ESPSu), copy_header(3\-ESPSu),SCBK(5\-ESPS), ESPS(5\-ESPS).SH AUTHORAlan Parker

⌨️ 快捷键说明

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