#include <cstdlib>
#include <cstdio>
#include "EST_unix.h"
#include <cstring>
#include <limits>
#include "EST_wave_aux.h"
#include "EST_wave_utils.h"
#include "EST_strcasecmp.h"
#include "waveP.h"
#include "EST_FileType.h"
#include "EST_File.h"
#include "esps_utils.h"
Go to the source code of this file.
Macros | |
#define | NIST_HDR_SIZE 1024 |
#define | WAVE_FORMAT_PCM 0x0001 |
#define | WAVE_FORMAT_ADPCM 0x0002 |
#define | WAVE_FORMAT_ALAW 0x0006 |
#define | WAVE_FORMAT_MULAW 0x0007 |
Functions | |
int | nist_get_param_int (const char *hdr, const char *field, int def_val) |
char * | nist_get_param_str (const char *hdr, const char *field, const char *def_val) |
const char * | sample_type_to_nist (enum EST_sample_type_t sample_type) |
enum EST_sample_type_t | nist_to_sample_type (char *type) |
enum EST_read_status | load_wave_nist (EST_TokenStream &ts, short **data, int *num_samples, int *num_channels, int *word_size, int *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int offset, int length) |
enum EST_write_status | save_wave_nist_header (FILE *fp, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_nist_data (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_nist (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_read_status | load_wave_est (EST_TokenStream &ts, short **data, int *num_samples, int *num_channels, int *word_size, int *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int offset, int length) |
enum EST_write_status | save_wave_est_header (FILE *fp, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_est_data (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_est (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_read_status | load_wave_riff (EST_TokenStream &ts, short **data, int *num_samples, int *num_channels, int *word_size, int *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int offset, int length) |
enum EST_write_status | save_wave_riff_header (FILE *fp, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_riff_data (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_riff (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_read_status | load_wave_aiff (EST_TokenStream &ts, short **data, int *num_samples, int *num_channels, int *word_size, int *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int offset, int length) |
enum EST_write_status | save_wave_aiff_header (FILE *fp, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_aiff_data (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_aiff (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_read_status | load_wave_ulaw (EST_TokenStream &ts, short **data, int *num_samples, int *num_channels, int *word_size, int *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int offset, int length) |
enum EST_write_status | save_wave_ulaw_header (FILE *fp, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_ulaw_data (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_ulaw (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_read_status | load_wave_alaw (EST_TokenStream &ts, short **data, int *num_samples, int *num_channels, int *word_size, int *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int offset, int length) |
enum EST_write_status | save_wave_alaw_header (FILE *fp, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_alaw_data (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_alaw (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_read_status | load_wave_snd (EST_TokenStream &ts, short **data, int *num_samples, int *num_channels, int *word_size, int *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int offset, int length) |
enum EST_write_status | save_wave_snd_header (FILE *fp, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_snd_data (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_snd (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_read_status | load_wave_audlab (EST_TokenStream &ts, short **data, int *num_samples, int *num_channels, int *word_size, int *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int offset, int length) |
enum EST_write_status | save_wave_audlab_header (FILE *fp, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_audlab_data (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_audlab (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_read_status | load_wave_sd (EST_TokenStream &ts, short **data, int *num_samples, int *num_channels, int *word_size, int *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int offset, int length) |
enum EST_write_status | save_wave_sd_header (FILE *fp, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_sd_data (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_sd (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_read_status | load_wave_raw (EST_TokenStream &ts, short **data, int *num_samples, int *num_channels, int *word_size, int *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int offset, int length, int isample_rate, enum EST_sample_type_t isample_type, int ibo, int inc) |
enum EST_write_status | save_wave_raw_header (FILE *fp, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_raw_data (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | save_wave_raw (FILE *fp, const short *data, int offset, int num_samples, int num_channels, int sample_rate, enum EST_sample_type_t sample_type, int bo) |
enum EST_write_status | wave_io_save_header (FILE *fp, const int num_samples, const int num_channels, const int sample_rate, const EST_String &stype, const int bo, const EST_String &ftype) |
enum EST_write_status | wave_io_save_data (FILE *fp, const short *data, const int offset, const int num_samples, const int num_channels, const int sample_rate, const EST_String &stype, const int bo, const EST_String &ftype) |
#define NIST_HDR_SIZE 1024 |
Definition at line 73 of file EST_wave_io.cc.
#define WAVE_FORMAT_PCM 0x0001 |
Definition at line 522 of file EST_wave_io.cc.
#define WAVE_FORMAT_ADPCM 0x0002 |
Definition at line 523 of file EST_wave_io.cc.
#define WAVE_FORMAT_ALAW 0x0006 |
Definition at line 524 of file EST_wave_io.cc.
#define WAVE_FORMAT_MULAW 0x0007 |
Definition at line 525 of file EST_wave_io.cc.
Definition at line 75 of file EST_wave_io.cc.
char* nist_get_param_str | ( | const char * | hdr, |
const char * | field, | ||
const char * | def_val | ||
) |
Definition at line 91 of file EST_wave_io.cc.
const char* sample_type_to_nist | ( | enum EST_sample_type_t | sample_type | ) |
Definition at line 112 of file EST_wave_io.cc.
enum EST_sample_type_t nist_to_sample_type | ( | char * | type | ) |
Definition at line 139 of file EST_wave_io.cc.
enum EST_read_status load_wave_nist | ( | EST_TokenStream & | ts, |
short ** | data, | ||
int * | num_samples, | ||
int * | num_channels, | ||
int * | word_size, | ||
int * | sample_rate, | ||
enum EST_sample_type_t * | sample_type, | ||
int * | bo, | ||
int | offset, | ||
int | length | ||
) |
Definition at line 171 of file EST_wave_io.cc.
enum EST_write_status save_wave_nist_header | ( | FILE * | fp, |
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 320 of file EST_wave_io.cc.
enum EST_write_status save_wave_nist_data | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 368 of file EST_wave_io.cc.
enum EST_write_status save_wave_nist | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 382 of file EST_wave_io.cc.
enum EST_read_status load_wave_est | ( | EST_TokenStream & | ts, |
short ** | data, | ||
int * | num_samples, | ||
int * | num_channels, | ||
int * | word_size, | ||
int * | sample_rate, | ||
enum EST_sample_type_t * | sample_type, | ||
int * | bo, | ||
int | offset, | ||
int | length | ||
) |
Definition at line 398 of file EST_wave_io.cc.
enum EST_write_status save_wave_est_header | ( | FILE * | fp, |
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 467 of file EST_wave_io.cc.
enum EST_write_status save_wave_est_data | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 485 of file EST_wave_io.cc.
enum EST_write_status save_wave_est | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 498 of file EST_wave_io.cc.
enum EST_read_status load_wave_riff | ( | EST_TokenStream & | ts, |
short ** | data, | ||
int * | num_samples, | ||
int * | num_channels, | ||
int * | word_size, | ||
int * | sample_rate, | ||
enum EST_sample_type_t * | sample_type, | ||
int * | bo, | ||
int | offset, | ||
int | length | ||
) |
Definition at line 527 of file EST_wave_io.cc.
enum EST_write_status save_wave_riff_header | ( | FILE * | fp, |
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 685 of file EST_wave_io.cc.
enum EST_write_status save_wave_riff_data | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 747 of file EST_wave_io.cc.
enum EST_write_status save_wave_riff | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 762 of file EST_wave_io.cc.
enum EST_read_status load_wave_aiff | ( | EST_TokenStream & | ts, |
short ** | data, | ||
int * | num_samples, | ||
int * | num_channels, | ||
int * | word_size, | ||
int * | sample_rate, | ||
enum EST_sample_type_t * | sample_type, | ||
int * | bo, | ||
int | offset, | ||
int | length | ||
) |
Definition at line 792 of file EST_wave_io.cc.
enum EST_write_status save_wave_aiff_header | ( | FILE * | fp, |
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 953 of file EST_wave_io.cc.
enum EST_write_status save_wave_aiff_data | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1011 of file EST_wave_io.cc.
enum EST_write_status save_wave_aiff | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1031 of file EST_wave_io.cc.
enum EST_read_status load_wave_ulaw | ( | EST_TokenStream & | ts, |
short ** | data, | ||
int * | num_samples, | ||
int * | num_channels, | ||
int * | word_size, | ||
int * | sample_rate, | ||
enum EST_sample_type_t * | sample_type, | ||
int * | bo, | ||
int | offset, | ||
int | length | ||
) |
Definition at line 1048 of file EST_wave_io.cc.
enum EST_write_status save_wave_ulaw_header | ( | FILE * | fp, |
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1090 of file EST_wave_io.cc.
enum EST_write_status save_wave_ulaw_data | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1104 of file EST_wave_io.cc.
enum EST_write_status save_wave_ulaw | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1119 of file EST_wave_io.cc.
enum EST_read_status load_wave_alaw | ( | EST_TokenStream & | ts, |
short ** | data, | ||
int * | num_samples, | ||
int * | num_channels, | ||
int * | word_size, | ||
int * | sample_rate, | ||
enum EST_sample_type_t * | sample_type, | ||
int * | bo, | ||
int | offset, | ||
int | length | ||
) |
Definition at line 1134 of file EST_wave_io.cc.
enum EST_write_status save_wave_alaw_header | ( | FILE * | fp, |
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1176 of file EST_wave_io.cc.
enum EST_write_status save_wave_alaw_data | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1190 of file EST_wave_io.cc.
enum EST_write_status save_wave_alaw | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1203 of file EST_wave_io.cc.
enum EST_read_status load_wave_snd | ( | EST_TokenStream & | ts, |
short ** | data, | ||
int * | num_samples, | ||
int * | num_channels, | ||
int * | word_size, | ||
int * | sample_rate, | ||
enum EST_sample_type_t * | sample_type, | ||
int * | bo, | ||
int | offset, | ||
int | length | ||
) |
Definition at line 1230 of file EST_wave_io.cc.
enum EST_write_status save_wave_snd_header | ( | FILE * | fp, |
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1340 of file EST_wave_io.cc.
enum EST_write_status save_wave_snd_data | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1396 of file EST_wave_io.cc.
enum EST_write_status save_wave_snd | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1413 of file EST_wave_io.cc.
enum EST_read_status load_wave_audlab | ( | EST_TokenStream & | ts, |
short ** | data, | ||
int * | num_samples, | ||
int * | num_channels, | ||
int * | word_size, | ||
int * | sample_rate, | ||
enum EST_sample_type_t * | sample_type, | ||
int * | bo, | ||
int | offset, | ||
int | length | ||
) |
Definition at line 1528 of file EST_wave_io.cc.
enum EST_write_status save_wave_audlab_header | ( | FILE * | fp, |
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1599 of file EST_wave_io.cc.
enum EST_write_status save_wave_audlab_data | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1646 of file EST_wave_io.cc.
enum EST_write_status save_wave_audlab | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1662 of file EST_wave_io.cc.
enum EST_read_status load_wave_sd | ( | EST_TokenStream & | ts, |
short ** | data, | ||
int * | num_samples, | ||
int * | num_channels, | ||
int * | word_size, | ||
int * | sample_rate, | ||
enum EST_sample_type_t * | sample_type, | ||
int * | bo, | ||
int | offset, | ||
int | length | ||
) |
Definition at line 1686 of file EST_wave_io.cc.
enum EST_write_status save_wave_sd_header | ( | FILE * | fp, |
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1773 of file EST_wave_io.cc.
enum EST_write_status save_wave_sd_data | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1823 of file EST_wave_io.cc.
enum EST_write_status save_wave_sd | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1839 of file EST_wave_io.cc.
enum EST_read_status load_wave_raw | ( | EST_TokenStream & | ts, |
short ** | data, | ||
int * | num_samples, | ||
int * | num_channels, | ||
int * | word_size, | ||
int * | sample_rate, | ||
enum EST_sample_type_t * | sample_type, | ||
int * | bo, | ||
int | offset, | ||
int | length, | ||
int | isample_rate, | ||
enum EST_sample_type_t | isample_type, | ||
int | ibo, | ||
int | inc | ||
) |
Definition at line 1859 of file EST_wave_io.cc.
enum EST_write_status save_wave_raw_header | ( | FILE * | fp, |
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1954 of file EST_wave_io.cc.
enum EST_write_status save_wave_raw_data | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1968 of file EST_wave_io.cc.
enum EST_write_status save_wave_raw | ( | FILE * | fp, |
const short * | data, | ||
int | offset, | ||
int | num_samples, | ||
int | num_channels, | ||
int | sample_rate, | ||
enum EST_sample_type_t | sample_type, | ||
int | bo | ||
) |
Definition at line 1982 of file EST_wave_io.cc.
enum EST_write_status wave_io_save_header | ( | FILE * | fp, |
const int | num_samples, | ||
const int | num_channels, | ||
const int | sample_rate, | ||
const EST_String & | stype, | ||
const int | bo, | ||
const EST_String & | ftype | ||
) |
Definition at line 2000 of file EST_wave_io.cc.
enum EST_write_status wave_io_save_data | ( | FILE * | fp, |
const short * | data, | ||
const int | offset, | ||
const int | num_samples, | ||
const int | num_channels, | ||
const int | sample_rate, | ||
const EST_String & | stype, | ||
const int | bo, | ||
const EST_String & | ftype | ||
) |
Definition at line 2055 of file EST_wave_io.cc.