|
|
|
|
|
|
|
|
int LoadFrame(SpectFrame *frame, FILE *stream, int file_format_type) |
|
|
int LoadFrame(SpectFrame *frame, FILE *stream, int file_format_type) |
|
|
{ |
|
|
{ |
|
|
short ix; |
|
|
short ix; |
|
|
short x; |
|
|
|
|
|
|
|
|
unsigned short x; |
|
|
unsigned short *spect_data; |
|
|
unsigned short *spect_data; |
|
|
|
|
|
|
|
|
frame->time = read_double(stream); |
|
|
frame->time = read_double(stream); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
espeak_ng_STATUS LoadSpectSeq(SpectSeq *spect, const char *filename) |
|
|
espeak_ng_STATUS LoadSpectSeq(SpectSeq *spect, const char *filename) |
|
|
{ |
|
|
{ |
|
|
short n, temp; |
|
|
|
|
|
|
|
|
unsigned short n; |
|
|
|
|
|
short temp; |
|
|
int ix; |
|
|
int ix; |
|
|
uint32_t id1, id2, name_len; |
|
|
uint32_t id1, id2, name_len; |
|
|
int set_max_y = 0; |
|
|
int set_max_y = 0; |
|
|
|
|
|
|
|
|
} else |
|
|
} else |
|
|
spect->name = NULL; |
|
|
spect->name = NULL; |
|
|
|
|
|
|
|
|
fread(&n, sizeof(short), 1, stream); |
|
|
|
|
|
|
|
|
fread(&n, sizeof(unsigned short), 1, stream); |
|
|
fread(&spect->amplitude, sizeof(short), 1, stream); |
|
|
fread(&spect->amplitude, sizeof(short), 1, stream); |
|
|
fread(&spect->max_y, sizeof(short), 1, stream); |
|
|
fread(&spect->max_y, sizeof(short), 1, stream); |
|
|
fread(&temp, sizeof(short), 1, stream); // unused |
|
|
fread(&temp, sizeof(short), 1, stream); // unused |