Edinburgh Speech Tools  2.1-release
waveP.h
Go to the documentation of this file.
1 /*************************************************************************/
2 /* */
3 /* Centre for Speech Technology Research */
4 /* University of Edinburgh, UK */
5 /* Copyright (c) 1996 */
6 /* All Rights Reserved. */
7 /* */
8 /* Permission is hereby granted, free of charge, to use and distribute */
9 /* this software and its documentation without restriction, including */
10 /* without limitation the rights to use, copy, modify, merge, publish, */
11 /* distribute, sublicense, and/or sell copies of this work, and to */
12 /* permit persons to whom this work is furnished to do so, subject to */
13 /* the following conditions: */
14 /* 1. The code must retain the above copyright notice, this list of */
15 /* conditions and the following disclaimer. */
16 /* 2. Any modifications must be clearly marked as such. */
17 /* 3. Original authors' names are not deleted. */
18 /* 4. The authors' names are not used to endorse or promote products */
19 /* derived from this software without specific prior written */
20 /* permission. */
21 /* */
22 /* THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK */
23 /* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
24 /* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
25 /* SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE */
26 /* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
27 /* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
28 /* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
29 /* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
30 /* THIS SOFTWARE. */
31 /* */
32 /*************************************************************************/
33 /* Author : Alan Black and Paul Taylor */
34 /* Date : June 1996 */
35 /*-----------------------------------------------------------------------*/
36 /* Non public wave related functions */
37 /* */
38 /*=======================================================================*/
39 #ifndef __WAVEP_H__
40 #define __WAVEP_H__
41 
42 #include <cstdio>
43 #include "EST_rw_status.h"
44 #include "EST_wave_utils.h"
45 
46 /* The following three (raw, alaw and ulaw) cannot be in the table as they cannot */
47 /* identify themselves from files (both are unheadered) */
48 enum EST_read_status load_wave_raw(EST_TokenStream &ts, short **data, int
49  *num_samples, int *num_channels, int *word_size, int
50  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
51  offset, int length, int isample_rate, enum EST_sample_type_t
52  isample_type, int ibo, int inc);
53 enum EST_write_status save_wave_raw(FILE *fp, const short *data, int offset,
54  int num_samples, int num_channels,
55  int sample_rate,
56  enum EST_sample_type_t sample_type, int bo);
57 
59  int num_samples, int num_channels,
60  int sample_rate,
61  enum EST_sample_type_t sample_type, int bo);
62 
63 enum EST_write_status save_wave_raw_data(FILE *fp, const short *data, int offset,
64  int num_samples, int num_channels,
65  int sample_rate,
66  enum EST_sample_type_t sample_type, int bo);
67 
68 enum EST_read_status load_wave_ulaw(EST_TokenStream &ts, short **data, int
69  *num_samples, int *num_channels, int *word_size, int
70  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
71  offset, int length);
72 enum EST_write_status save_wave_ulaw(FILE *fp, const short *data, int offset,
73  int length, int num_channels,
74  int sample_rate,
75  enum EST_sample_type_t, int bo);
76 
78  int num_samples, int num_channels,
79  int sample_rate,
80  enum EST_sample_type_t sample_type, int bo);
81 
82 enum EST_write_status save_wave_ulaw_data(FILE *fp, const short *data, int offset,
83  int num_samples, int num_channels,
84  int sample_rate,
85  enum EST_sample_type_t sample_type, int bo);
86 
87 enum EST_read_status load_wave_alaw(EST_TokenStream &ts, short **data, int
88  *num_samples, int *num_channels, int *word_size, int
89  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
90  offset, int length);
91 enum EST_write_status save_wave_alaw(FILE *fp, const short *data, int offset,
92  int length, int num_channels,
93  int sample_rate,
94  enum EST_sample_type_t, int bo);
95 
97  int num_samples, int num_channels,
98  int sample_rate,
99  enum EST_sample_type_t sample_type, int bo);
100 
101 enum EST_write_status save_wave_alaw_data(FILE *fp, const short *data, int offset,
102  int num_samples, int num_channels,
103  int sample_rate,
104  enum EST_sample_type_t sample_type, int bo);
105 
106 enum EST_read_status load_wave_nist(EST_TokenStream &ts, short **data, int
107  *num_samples, int *num_channels, int *word_size, int
108  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
109  offset, int length);
110 
111 enum EST_write_status save_wave_nist(FILE *fp, const short *data, int offset,
112  int num_samples, int num_channels,
113  int sample_rate,
114  enum EST_sample_type_t sample_type, int bo);
115 
117  int num_samples, int num_channels,
118  int sample_rate,
119  enum EST_sample_type_t sample_type, int bo);
120 
121 enum EST_write_status save_wave_nist_data(FILE *fp, const short *data, int offset,
122  int num_samples, int num_channels,
123  int sample_rate,
124  enum EST_sample_type_t sample_type, int bo);
125 
126 enum EST_read_status load_wave_est(EST_TokenStream &ts, short **data, int
127  *num_samples, int *num_channels, int *word_size, int
128  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
129  offset, int length);
130 
131 enum EST_write_status save_wave_est(FILE *fp, const short *data, int offset,
132  int num_samples, int num_channels,
133  int sample_rate,
134  enum EST_sample_type_t sample_type, int bo);
135 
137  int num_samples, int num_channels,
138  int sample_rate,
139  enum EST_sample_type_t sample_type, int bo);
140 
141 enum EST_write_status save_wave_est_data(FILE *fp, const short *data, int offset,
142  int num_samples, int num_channels,
143  int sample_rate,
144  enum EST_sample_type_t sample_type, int bo);
145 
146 enum EST_read_status load_wave_sd(EST_TokenStream &ts, short **data, int
147  *num_samples, int *num_channels, int *word_size, int
148  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
149  offset, int length);
150 
151 enum EST_write_status save_wave_sd(FILE *fp, const short *data, int offset,
152  int num_samples, int num_channels,
153  int sample_rate,
154  enum EST_sample_type_t sample_type, int bo);
155 
157  int num_samples, int num_channels,
158  int sample_rate,
159  enum EST_sample_type_t sample_type, int bo);
160 
161 enum EST_write_status save_wave_sd_data(FILE *fp, const short *data, int offset,
162  int num_samples, int num_channels,
163  int sample_rate,
164  enum EST_sample_type_t sample_type, int bo);
165 
166 enum EST_read_status load_wave_audlab(EST_TokenStream &ts, short **data, int
167  *num_samples, int *num_channels, int *word_size, int
168  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
169  offset, int length);
170 
171 enum EST_write_status save_wave_audlab(FILE *fp, const short *data, int offset,
172  int num_samples, int num_channels,
173  int sample_rate,
174  enum EST_sample_type_t sample_type, int bo);
175 
177  int num_samples, int num_channels,
178  int sample_rate,
179  enum EST_sample_type_t sample_type, int bo);
180 
181 enum EST_write_status save_wave_audlab_data(FILE *fp, const short *data, int offset,
182  int num_samples, int num_channels,
183  int sample_rate,
184  enum EST_sample_type_t sample_type, int bo);
185 
186 enum EST_read_status load_wave_snd(EST_TokenStream &ts, short **data, int
187  *num_samples, int *num_channels, int *word_size, int
188  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
189  offset, int length);
190 
191 enum EST_write_status save_wave_snd(FILE *fp, const short *data, int offset,
192  int num_samples, int num_channels,
193  int sample_rate,
194  enum EST_sample_type_t sample_type, int bo);
195 
197  int num_samples, int num_channels,
198  int sample_rate,
199  enum EST_sample_type_t sample_type, int bo);
200 
201 enum EST_write_status save_wave_snd_data(FILE *fp, const short *data, int offset,
202  int num_samples, int num_channels,
203  int sample_rate,
204  enum EST_sample_type_t sample_type, int bo);
205 
206 enum EST_read_status load_wave_aiff(EST_TokenStream &ts, short **data, int
207  *num_samples, int *num_channels, int *word_size, int
208  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
209  offset, int length);
210 
211 enum EST_write_status save_wave_aiff(FILE *fp, const short *data, int offset,
212  int num_samples, int num_channels,
213  int sample_rate,
214  enum EST_sample_type_t sample_type, int bo);
215 
217  int num_samples, int num_channels,
218  int sample_rate,
219  enum EST_sample_type_t sample_type, int bo);
220 
221 enum EST_write_status save_wave_aiff_data(FILE *fp, const short *data, int offset,
222  int num_samples, int num_channels,
223  int sample_rate,
224  enum EST_sample_type_t sample_type, int bo);
225 
226 enum EST_read_status load_wave_riff(EST_TokenStream &ts, short **data, int
227  *num_samples, int *num_channels, int *word_size, int
228  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
229  offset, int length);
230 
231 enum EST_write_status save_wave_riff(FILE *fp, const short *data, int offset,
232  int num_samples, int num_channels,
233  int sample_rate,
234  enum EST_sample_type_t sample_type, int bo);
235 
237  int num_samples, int num_channels,
238  int sample_rate,
239  enum EST_sample_type_t sample_type, int bo);
240 
241 enum EST_write_status save_wave_riff_data(FILE *fp, const short *data, int offset,
242  int num_samples, int num_channels,
243  int sample_rate,
244  enum EST_sample_type_t sample_type, int bo);
245 
246 #endif /* __EST_WAVEP_H__ */
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: EST_wave_io.cc:320
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: EST_wave_io.cc:368
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)
EST_write_status
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_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(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_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_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: EST_wave_io.cc:398
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_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: EST_wave_io.cc:485
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: EST_wave_io.cc:498
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: EST_wave_io.cc:747
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: EST_wave_io.cc:792
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_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_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: EST_wave_io.cc:382
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_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_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_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: EST_wave_io.cc:762
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: EST_wave_io.cc:685
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_ulaw(FILE *fp, const short *data, int offset, int length, int num_channels, int sample_rate, enum EST_sample_type_t, 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_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_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_write_status save_wave_alaw(FILE *fp, const short *data, int offset, int length, int num_channels, int sample_rate, enum EST_sample_type_t, 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)
EST_read_status
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_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: EST_wave_io.cc:171
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: EST_wave_io.cc:953
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)
EST_sample_type_t
Definition: EST_wave_aux.h:105
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_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: EST_wave_io.cc:527
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: EST_wave_io.cc:467
LISP fp
Definition: kkcompile.cc:63
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_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_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)