#include <julius.h>
#include <time.h>
record.cのインクルード依存関係図
マクロ定義 | |
#define | TSTRLEN 18 |
String length of a time format | |
関数 | |
static void | timestring (char *t, int maxlen) |
static void | make_record_filename (char *buf, int buflen, char *filename) |
static void | make_tmp_filename (char *buf, int buflen) |
void | record_sample_open () |
void | record_sample_write (SP16 *speech, int samplenum) |
void | record_sample_close () |
変数 | |
static char | tstr [TSTRLEN] |
Work area to hold time string | |
static char | recfilename [MAXLINELEN] |
Temporary file name for storing the incoming data | |
static char | finalfilename [MAXLINELEN] |
After recording is done, the file will be renames to this | |
static FILE * | fp = NULL |
File pointer of current file. | |
static int | totalnum |
Current number of recorded samples. |
録音はいったんメモリに確保されずに、入力と平行してファイルに直接 書き込まれる。最初は一時ファイルに記録され、録音終了後(=第1パス 終了後)に上記の形式のファイル名に変更される。
record.c で定義されています。
static void timestring | ( | char * | t, | |
int | maxlen | |||
) | [static] |
システム時間からベースファイル名を作成する.
t | [out] 結果を格納する文字列バッファ | |
maxlen | [in] t の最大長 |
static void make_record_filename | ( | char * | buf, | |
int | buflen, | |||
char * | filename | |||
) | [static] |
ベースファイル名から実際のパス名を作成する.ディレクトリは大域変数 record_dirname であらかじめ指定されている.
buf | [out] 結果のパス名を格納するバッファへのポインタ | |
buflen | [in] buf の最大長 | |
filename | [in] ベースファイル名 |
static void make_tmp_filename | ( | char * | buf, | |
int | buflen | |||
) | [static] |
void record_sample_open | ( | ) |
録音のために一時ファイルをオープンする.
void record_sample_write | ( | SP16 * | speech, | |
int | samplenum | |||
) |
入力音声断片をファイルに追加記録する.
speech | [in] 音声データのバッファ | |
samplenum | [in] 音声データの長さ(サンプル数) |
void record_sample_close | ( | ) |