#include <sent/stddefs.h>
#include <sent/speech.h>
wrwav.cのインクルード依存関係図
マクロ定義 | |
#define | MYWRITE(A, B, C, D) if (!mywrite(A, B, C, D)) {j_printerr("wrwav_open: write failed\n"); fclose_writefile(fp); return NULL;} |
Function macro to mywrite() with error handling. | |
関数 | |
static boolean | mywrite (void *buf, size_t unitbyte, int unitnum, FILE *fp) |
FILE * | wrwav_open (char *filename, int sfreq) |
Open/create a WAVE file and write header. | |
boolean | wrwav_data (FILE *fp, SP16 *buf, int len) |
boolean | wrwav_close (FILE *fp) |
Close the file. | |
変数 | |
static int | totallen |
Total number of samples written to the file. |
wrwav.c で定義されています。
static boolean mywrite | ( | void * | buf, | |
size_t | unitbyte, | |||
int | unitnum, | |||
FILE * | fp | |||
) | [static] |
Write speech data in little endian.
buf | [in] speech data | |
unitbyte | [in] unit size in bytes | |
unitnum | [in] number of units to be written | |
fp | [in] file pointer |
FILE* wrwav_open | ( | char * | filename, | |
int | sfreq | |||
) |
Open/create a WAVE file and write header.
Open or creat a new WAV file and prepare for later data writing. The frame length written here is dummy, and will be overwritten when closed by wrwav_close().
filename | [in] file name | |
sfreq | [in] sampling frequency of the data you are going to write |
参照元 record_sample_open().
Write speech samples.
fp | [in] file descriptor | |
buf | [in] speech data to be written | |
len | [in] length of above |
boolean wrwav_close | ( | FILE * | fp | ) |
Close the file.
The frame length in the header part is overwritten by the actual value before file close.
fp | [in] file pointer to close, previously opened by wrwav_open(). |