Edinburgh Speech Tools  2.4-release
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Pages
waveP.h
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 <stdio.h>
43 
44 /* The follow two (raw and ulaw) cannot be in the table as they cannot */
45 /* identify themselves from files (both are unheadered) */
46 enum EST_read_status load_wave_raw(EST_TokenStream &ts, short **data, int
47  *num_samples, int *num_channels, int *word_size, int
48  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
49  offset, int length, int isample_rate, enum EST_sample_type_t
50  isample_type, int ibo, int inc);
51 enum EST_write_status save_wave_raw(FILE *fp, const short *data, int offset,
52  int num_samples, int num_channels,
53  int sample_rate,
54  enum EST_sample_type_t sample_type, int bo) ;
55 
56 enum EST_read_status load_wave_ulaw(EST_TokenStream &ts, short **data, int
57  *num_samples, int *num_channels, int *word_size, int
58  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
59  offset, int length);
60 enum EST_write_status save_wave_ulaw(FILE *fp, const short *data, int offset,
61  int length, int num_channels,
62  int sample_rate,
63  enum EST_sample_type_t, int bo);
64 
65 enum EST_read_status load_wave_nist(EST_TokenStream &ts, short **data, int
66  *num_samples, int *num_channels, int *word_size, int
67  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
68  offset, int length);
69 
70 enum EST_write_status save_wave_nist(FILE *fp, const short *data, int offset,
71  int num_samples, int num_channels,
72  int sample_rate,
73  enum EST_sample_type_t sample_type, int bo);
74 
75 enum EST_read_status load_wave_est(EST_TokenStream &ts, short **data, int
76  *num_samples, int *num_channels, int *word_size, int
77  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
78  offset, int length);
79 
80 enum EST_write_status save_wave_est(FILE *fp, const short *data, int offset,
81  int num_samples, int num_channels,
82  int sample_rate,
83  enum EST_sample_type_t sample_type, int bo);
84 
85 enum EST_read_status load_wave_sd(EST_TokenStream &ts, short **data, int
86  *num_samples, int *num_channels, int *word_size, int
87  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
88  offset, int length);
89 
90 enum EST_write_status save_wave_sd(FILE *fp, const short *data, int offset,
91  int num_samples, int num_channels,
92  int sample_rate,
93  enum EST_sample_type_t sample_type, int bo);
94 
95 enum EST_read_status load_wave_audlab(EST_TokenStream &ts, short **data, int
96  *num_samples, int *num_channels, int *word_size, int
97  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
98  offset, int length);
99 
100 enum EST_write_status save_wave_audlab(FILE *fp, const short *data, int offset,
101  int num_samples, int num_channels,
102  int sample_rate,
103  enum EST_sample_type_t sample_type, int bo);
104 
105 enum EST_read_status load_wave_snd(EST_TokenStream &ts, short **data, int
106  *num_samples, int *num_channels, int *word_size, int
107  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
108  offset, int length);
109 
110 enum EST_write_status save_wave_snd(FILE *fp, const short *data, int offset,
111  int num_samples, int num_channels,
112  int sample_rate,
113  enum EST_sample_type_t sample_type, int bo);
114 
115 enum EST_read_status load_wave_aiff(EST_TokenStream &ts, short **data, int
116  *num_samples, int *num_channels, int *word_size, int
117  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
118  offset, int length);
119 
120 enum EST_write_status save_wave_aiff(FILE *fp, const short *data, int offset,
121  int num_samples, int num_channels,
122  int sample_rate,
123  enum EST_sample_type_t sample_type, int bo);
124 
125 enum EST_read_status load_wave_riff(EST_TokenStream &ts, short **data, int
126  *num_samples, int *num_channels, int *word_size, int
127  *sample_rate, enum EST_sample_type_t *sample_type, int *bo, int
128  offset, int length);
129 
130 enum EST_write_status save_wave_riff(FILE *fp, const short *data, int offset,
131  int num_samples, int num_channels,
132  int sample_rate,
133  enum EST_sample_type_t sample_type, int bo);
134 
135 #endif /* __EST_WAVEP_H__ */