#include <sent/stddefs.h>
#include <sent/speech.h>
Include dependency graph for wrwav.c:
Go to the source code of this file.
Defines | |
#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. | |
Functions | |
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. | |
Variables | |
static int | totallen |
Total number of samples written to the file. |
Definition in file wrwav.c.
|
Write speech data in little endian.
Definition at line 40 of file wrwav.c. Referenced by CMN_save_to_file(), wrwav_close(), and wrwav_data(). |
|
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().
Definition at line 73 of file wrwav.c. Referenced by record_sample_open(). |
|
Write speech samples.
Definition at line 126 of file wrwav.c. Referenced by record_sample_write(). |
|
Close the file. The frame length in the header part is overwritten by the actual value before file close.
Definition at line 146 of file wrwav.c. Referenced by record_sample_close(). |