Mercurial > SDL_sound_CoreAudio
annotate decoders/voc.c @ 119:254916e602c6
Updated.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 06 Oct 2001 22:11:09 +0000 |
parents | dd95a12539fd |
children | 1df5c106504e |
rev | line source |
---|---|
14 | 1 /* |
2 * SDL_sound -- An abstract sound format decoding API. | |
3 * Copyright (C) 2001 Ryan C. Gordon. | |
4 * | |
5 * This library is free software; you can redistribute it and/or | |
6 * modify it under the terms of the GNU Lesser General Public | |
7 * License as published by the Free Software Foundation; either | |
8 * version 2.1 of the License, or (at your option) any later version. | |
9 * | |
10 * This library is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 * Lesser General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU Lesser General Public | |
16 * License along with this library; if not, write to the Free Software | |
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 */ | |
19 | |
20 /* | |
21 * VOC decoder for SDL_sound. | |
22 * | |
23 * This driver handles Creative Labs VOC audio data...this is a legacy format, | |
24 * but there's some game ports that could make use of such a decoder. Plus, | |
25 * VOC is fairly straightforward to decode, so this is a more complex, but | |
26 * still palatable example of an SDL_sound decoder. Y'know, in case the | |
27 * RAW decoder didn't do it for you. :) | |
28 * | |
29 * This code was ripped from a decoder I had written for SDL_mixer, which was | |
30 * largely ripped from sox v12.17.1's voc.c. | |
31 * | |
32 * SDL_mixer: http://www.libsdl.org/projects/SDL_mixer/ | |
33 * sox: http://www.freshmeat.net/projects/sox/ | |
34 * | |
35 * Please see the file LICENSE in the source's root directory. | |
36 * | |
37 * This file written by Ryan C. Gordon. (icculus@clutteredmind.org) | |
38 */ | |
39 | |
106
40de367eb59e
Changing my include structure to do this right.
Ryan C. Gordon <icculus@icculus.org>
parents:
104
diff
changeset
|
40 #if HAVE_CONFIG_H |
40de367eb59e
Changing my include structure to do this right.
Ryan C. Gordon <icculus@icculus.org>
parents:
104
diff
changeset
|
41 # include <config.h> |
40de367eb59e
Changing my include structure to do this right.
Ryan C. Gordon <icculus@icculus.org>
parents:
104
diff
changeset
|
42 #endif |
100
6d9fdec2f708
added config.h, added --enable-debug flag, various other changes to the build system
fingolfin
parents:
64
diff
changeset
|
43 |
114
dd95a12539fd
Changed an #if defined to #ifdef, for consistency with the other
Ryan C. Gordon <icculus@icculus.org>
parents:
106
diff
changeset
|
44 #ifdef SOUND_SUPPORTS_VOC |
104
103cfcb3c014
Updated to fix build system problem.
Ryan C. Gordon <icculus@icculus.org>
parents:
100
diff
changeset
|
45 |
14 | 46 #include <stdio.h> |
47 #include <stdlib.h> | |
48 #include <string.h> | |
49 #include <assert.h> | |
50 | |
106
40de367eb59e
Changing my include structure to do this right.
Ryan C. Gordon <icculus@icculus.org>
parents:
104
diff
changeset
|
51 #include "SDL_sound.h" |
40de367eb59e
Changing my include structure to do this right.
Ryan C. Gordon <icculus@icculus.org>
parents:
104
diff
changeset
|
52 |
40de367eb59e
Changing my include structure to do this right.
Ryan C. Gordon <icculus@icculus.org>
parents:
104
diff
changeset
|
53 #define __SDL_SOUND_INTERNAL__ |
40de367eb59e
Changing my include structure to do this right.
Ryan C. Gordon <icculus@icculus.org>
parents:
104
diff
changeset
|
54 #include "SDL_sound_internal.h" |
40de367eb59e
Changing my include structure to do this right.
Ryan C. Gordon <icculus@icculus.org>
parents:
104
diff
changeset
|
55 |
47
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
56 static int VOC_init(void); |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
57 static void VOC_quit(void); |
14 | 58 static int VOC_open(Sound_Sample *sample, const char *ext); |
59 static void VOC_close(Sound_Sample *sample); | |
60 static Uint32 VOC_read(Sound_Sample *sample); | |
61 | |
62 const Sound_DecoderFunctions __Sound_DecoderFunctions_VOC = | |
63 { | |
64 { | |
65 "VOC", | |
66 "Creative Labs Voice format", | |
67 "Ryan C. Gordon <icculus@clutteredmind.org>", | |
68 "http://www.icculus.org/SDL_sound/" | |
69 }, | |
70 | |
47
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
71 VOC_init, /* init() method */ |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
72 VOC_quit, /* quit() method */ |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
73 VOC_open, /* open() method */ |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
74 VOC_close, /* close() method */ |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
75 VOC_read /* read() method */ |
14 | 76 }; |
77 | |
78 | |
79 /* Private data for VOC file */ | |
80 typedef struct vocstuff { | |
81 Uint32 rest; /* bytes remaining in current block */ | |
82 Uint32 rate; /* rate code (byte) of this chunk */ | |
83 int silent; /* sound or silence? */ | |
84 Uint32 srate; /* rate code (byte) of silence */ | |
85 Uint32 blockseek; /* start of current output block */ | |
86 Uint32 samples; /* number of samples output */ | |
87 Uint32 size; /* word length of data */ | |
32
4a60ee42ca9a
Fixed a byte-ordering issue.
Ryan C. Gordon <icculus@icculus.org>
parents:
22
diff
changeset
|
88 Uint8 channels; /* number of sound channels */ |
14 | 89 int extended; /* Has an extended block been read? */ |
90 Uint32 bufpos; /* byte position in internal->buffer. */ | |
91 } vs_t; | |
92 | |
62
b13fafb976be
Changed _D macro to DBGSND.
Ryan C. Gordon <icculus@icculus.org>
parents:
47
diff
changeset
|
93 /* Size field */ |
14 | 94 /* SJB: note that the 1st 3 are sometimes used as sizeof(type) */ |
95 #define ST_SIZE_BYTE 1 | |
96 #define ST_SIZE_8BIT 1 | |
97 #define ST_SIZE_WORD 2 | |
98 #define ST_SIZE_16BIT 2 | |
99 #define ST_SIZE_DWORD 4 | |
100 #define ST_SIZE_32BIT 4 | |
101 #define ST_SIZE_FLOAT 5 | |
102 #define ST_SIZE_DOUBLE 6 | |
103 #define ST_SIZE_IEEE 7 /* IEEE 80-bit floats. */ | |
104 | |
105 /* Style field */ | |
106 #define ST_ENCODING_UNSIGNED 1 /* unsigned linear: Sound Blaster */ | |
107 #define ST_ENCODING_SIGN2 2 /* signed linear 2's comp: Mac */ | |
108 #define ST_ENCODING_ULAW 3 /* U-law signed logs: US telephony, SPARC */ | |
109 #define ST_ENCODING_ALAW 4 /* A-law signed logs: non-US telephony */ | |
110 #define ST_ENCODING_ADPCM 5 /* Compressed PCM */ | |
111 #define ST_ENCODING_IMA_ADPCM 6 /* Compressed PCM */ | |
112 #define ST_ENCODING_GSM 7 /* GSM 6.10 33-byte frame lossy compression */ | |
113 | |
114 #define VOC_TERM 0 | |
115 #define VOC_DATA 1 | |
116 #define VOC_CONT 2 | |
117 #define VOC_SILENCE 3 | |
118 #define VOC_MARKER 4 | |
119 #define VOC_TEXT 5 | |
120 #define VOC_LOOP 6 | |
121 #define VOC_LOOPEND 7 | |
122 #define VOC_EXTENDED 8 | |
123 #define VOC_DATA_16 9 | |
124 | |
125 | |
47
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
126 static int VOC_init(void) |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
127 { |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
128 return(1); /* always succeeds. */ |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
129 } /* VOC_init */ |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
130 |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
131 |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
132 static void VOC_quit(void) |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
133 { |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
134 /* it's a no-op. */ |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
135 } /* VOC_quit */ |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
136 |
ea58bc3b15d7
Added init() and quit() methods.
Ryan C. Gordon <icculus@icculus.org>
parents:
32
diff
changeset
|
137 |
14 | 138 static __inline__ int voc_check_header(SDL_RWops *src) |
139 { | |
140 /* VOC magic header */ | |
141 Uint8 signature[20]; /* "Creative Voice File\032" */ | |
142 Uint16 datablockofs; | |
143 | |
144 if (SDL_RWread(src, signature, sizeof (signature), 1) != 1) | |
145 return(0); | |
146 | |
147 if (memcmp(signature, "Creative Voice File\032", sizeof (signature)) != 0) { | |
148 Sound_SetError("Unrecognized file type (not VOC)"); | |
149 return(0); | |
150 } | |
151 | |
152 /* get the offset where the first datablock is located */ | |
153 if (SDL_RWread(src, &datablockofs, sizeof (Uint16), 1) != 1) | |
154 return(0); | |
155 | |
156 datablockofs = SDL_SwapLE16(datablockofs); | |
157 | |
158 if (SDL_RWseek(src, datablockofs, SEEK_SET) != datablockofs) | |
159 return(0); | |
160 | |
161 return(1); /* success! */ | |
162 } /* voc_check_header */ | |
163 | |
164 /* !!! FIXME : Add a flag to vs_t that distinguishes EOF and Error conditions. */ | |
165 | |
166 /* Read next block header, save info, leave position at start of data */ | |
167 static int voc_get_block(Sound_Sample *sample) | |
168 { | |
169 Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; | |
170 SDL_RWops *src = internal->rw; | |
171 vs_t *v = (vs_t *) internal->decoder_private; | |
172 Uint8 bits24[3]; | |
173 Uint8 uc, block; | |
174 Uint32 sblen; | |
175 Uint16 new_rate_short; | |
176 Uint32 new_rate_long; | |
177 Uint8 trash[6]; | |
178 Uint16 period; | |
179 int i; | |
180 | |
181 v->silent = 0; | |
182 while (v->rest == 0) | |
183 { | |
184 if (SDL_RWread(src, &block, sizeof (block), 1) != 1) | |
185 return 1; /* assume that's the end of the file. */ | |
186 | |
187 if (block == VOC_TERM) | |
188 return 1; | |
189 | |
190 if (SDL_RWread(src, bits24, sizeof (bits24), 1) != 1) | |
191 return 1; /* assume that's the end of the file. */ | |
62
b13fafb976be
Changed _D macro to DBGSND.
Ryan C. Gordon <icculus@icculus.org>
parents:
47
diff
changeset
|
192 |
14 | 193 /* Size is an 24-bit value. Ugh. */ |
194 sblen = ( (bits24[0]) | (bits24[1] << 8) | (bits24[2] << 16) ); | |
195 | |
196 switch(block) | |
197 { | |
198 case VOC_DATA: | |
199 if (SDL_RWread(src, &uc, sizeof (uc), 1) != 1) | |
200 return 0; | |
201 | |
202 /* When DATA block preceeded by an EXTENDED */ | |
203 /* block, the DATA blocks rate value is invalid */ | |
204 if (!v->extended) | |
205 { | |
206 if (uc == 0) | |
207 { | |
208 Sound_SetError("VOC Sample rate is zero?"); | |
209 return 0; | |
210 } | |
211 | |
212 if ((v->rate != -1) && (uc != v->rate)) | |
213 { | |
214 Sound_SetError("VOC sample rate codes differ"); | |
215 return 0; | |
216 } | |
217 | |
218 v->rate = uc; | |
219 sample->actual.rate = 1000000.0/(256 - v->rate); | |
220 v->channels = 1; | |
221 } | |
222 | |
223 if (SDL_RWread(src, &uc, sizeof (uc), 1) != 1) | |
224 return 0; | |
225 | |
226 if (uc != 0) | |
227 { | |
228 Sound_SetError("VOC decoder only interprets 8-bit data"); | |
229 return 0; | |
230 } | |
231 | |
232 v->extended = 0; | |
233 v->rest = sblen - 2; | |
234 v->size = ST_SIZE_BYTE; | |
235 return 1; | |
236 | |
237 case VOC_DATA_16: | |
238 if (SDL_RWread(src, &new_rate_long, sizeof (new_rate_long), 1) != 1) | |
239 return 0; | |
240 new_rate_long = SDL_SwapLE32(new_rate_long); | |
241 if (new_rate_long == 0) | |
242 { | |
243 Sound_SetError("VOC Sample rate is zero?"); | |
244 return 0; | |
245 } | |
246 if ((v->rate != -1) && (new_rate_long != v->rate)) | |
247 { | |
248 Sound_SetError("VOC sample rate codes differ"); | |
249 return 0; | |
250 } | |
251 v->rate = new_rate_long; | |
252 sample->actual.rate = new_rate_long; | |
253 | |
254 if (SDL_RWread(src, &uc, sizeof (uc), 1) != 1) | |
255 return 0; | |
256 | |
257 switch (uc) | |
258 { | |
259 case 8: v->size = ST_SIZE_BYTE; break; | |
260 case 16: v->size = ST_SIZE_WORD; break; | |
261 default: | |
262 Sound_SetError("VOC with unknown data size"); | |
263 return 0; | |
264 } | |
265 | |
266 if (SDL_RWread(src, &v->channels, sizeof (Uint8), 1) != 1) | |
267 return 0; | |
268 | |
269 if (SDL_RWread(src, trash, sizeof (Uint8), 6) != 6) | |
270 return 0; | |
271 | |
272 v->rest = sblen - 12; | |
273 return 1; | |
274 | |
275 case VOC_CONT: | |
276 v->rest = sblen; | |
277 return 1; | |
278 | |
279 case VOC_SILENCE: | |
280 if (SDL_RWread(src, &period, sizeof (period), 1) != 1) | |
281 return 0; | |
282 period = SDL_SwapLE16(period); | |
283 | |
284 if (SDL_RWread(src, &uc, sizeof (uc), 1) != 1) | |
285 return 0; | |
286 if (uc == 0) | |
287 { | |
288 Sound_SetError("VOC silence sample rate is zero"); | |
289 return 0; | |
290 } | |
291 | |
292 /* | |
293 * Some silence-packed files have gratuitously | |
294 * different sample rate codes in silence. | |
295 * Adjust period. | |
296 */ | |
297 if ((v->rate != -1) && (uc != v->rate)) | |
298 period = (period * (256 - uc))/(256 - v->rate); | |
299 else | |
300 v->rate = uc; | |
301 v->rest = period; | |
302 v->silent = 1; | |
303 return 1; | |
304 | |
305 case VOC_LOOP: | |
306 case VOC_LOOPEND: | |
307 for(i = 0; i < sblen; i++) /* skip repeat loops. */ | |
308 { | |
309 if (SDL_RWread(src, trash, sizeof (Uint8), 1) != 1) | |
310 return 0; | |
311 } | |
312 break; | |
313 | |
314 case VOC_EXTENDED: | |
315 /* An Extended block is followed by a data block */ | |
316 /* Set this byte so we know to use the rate */ | |
317 /* value from the extended block and not the */ | |
318 /* data block. */ | |
319 v->extended = 1; | |
320 if (SDL_RWread(src, &new_rate_short, sizeof (new_rate_short), 1) != 1) | |
321 return 0; | |
322 new_rate_short = SDL_SwapLE16(new_rate_short); | |
323 if (new_rate_short == 0) | |
324 { | |
325 Sound_SetError("VOC sample rate is zero"); | |
326 return 0; | |
327 } | |
328 if ((v->rate != -1) && (new_rate_short != v->rate)) | |
329 { | |
330 Sound_SetError("VOC sample rate codes differ"); | |
331 return 0; | |
332 } | |
333 v->rate = new_rate_short; | |
334 | |
335 if (SDL_RWread(src, &uc, sizeof (uc), 1) != 1) | |
336 return 0; | |
337 | |
338 if (uc != 0) | |
339 { | |
340 Sound_SetError("VOC decoder only interprets 8-bit data"); | |
341 return 0; | |
342 } | |
343 | |
344 if (SDL_RWread(src, &uc, sizeof (uc), 1) != 1) | |
345 return 0; | |
346 | |
347 if (uc) | |
348 sample->actual.channels = 2; /* Stereo */ | |
349 /* Needed number of channels before finishing | |
350 compute for rate */ | |
351 sample->actual.rate = | |
352 (256000000L/(65536L - v->rate)) / sample->actual.channels; | |
353 /* An extended block must be followed by a data */ | |
354 /* block to be valid so loop back to top so it */ | |
355 /* can be grabed. */ | |
356 continue; | |
357 | |
358 case VOC_MARKER: | |
359 if (SDL_RWread(src, trash, sizeof (Uint8), 2) != 2) | |
360 return 0; | |
361 | |
362 /* Falling! Falling! */ | |
363 | |
364 default: /* text block or other krapola. */ | |
365 for(i = 0; i < sblen; i++) | |
366 { | |
367 if (SDL_RWread(src, &trash, sizeof (Uint8), 1) != 1) | |
368 return 0; | |
369 } | |
370 | |
371 if (block == VOC_TEXT) | |
372 continue; /* get next block */ | |
373 } | |
374 } | |
375 | |
376 return 1; | |
377 } | |
378 | |
379 | |
22
f6e679afe88b
Byte ordering fix, changed voc_read to voc_read_waveform, and cleaned up
Ryan C. Gordon <icculus@icculus.org>
parents:
14
diff
changeset
|
380 static int voc_read_waveform(Sound_Sample *sample) |
14 | 381 { |
382 Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; | |
383 SDL_RWops *src = internal->rw; | |
384 vs_t *v = (vs_t *) internal->decoder_private; | |
385 int done = 0; | |
386 Uint8 silence = 0x80; | |
387 Uint8 *buf = internal->buffer; | |
388 | |
389 if (v->rest == 0) | |
390 { | |
391 if (!voc_get_block(sample)) | |
392 return 0; | |
393 } | |
394 | |
395 if (v->rest == 0) | |
396 return 0; | |
397 | |
398 if (v->silent) | |
399 { | |
400 if (v->size == ST_SIZE_WORD) | |
401 silence = 0x00; | |
402 | |
403 /* Fill in silence */ | |
404 memset(buf, silence, v->rest); | |
405 done = v->rest; | |
406 v->rest = 0; | |
407 } | |
408 | |
409 else | |
410 { | |
411 Uint32 max = (v->rest < internal->buffer_size) ? | |
412 v->rest : internal->buffer_size; | |
413 done = SDL_RWread(src, buf + v->bufpos, 1, max); | |
414 v->rest -= done; | |
415 v->bufpos += done; | |
416 } | |
417 | |
418 return done; | |
22
f6e679afe88b
Byte ordering fix, changed voc_read to voc_read_waveform, and cleaned up
Ryan C. Gordon <icculus@icculus.org>
parents:
14
diff
changeset
|
419 } /* voc_read_waveform */ |
14 | 420 |
421 | |
422 static int VOC_open(Sound_Sample *sample, const char *ext) | |
423 { | |
424 Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; | |
425 vs_t *v = NULL; | |
426 | |
427 if (!voc_check_header(internal->rw)) | |
428 return(0); | |
429 | |
430 v = (vs_t *) malloc(sizeof (vs_t)); | |
431 BAIL_IF_MACRO(v == NULL, ERR_OUT_OF_MEMORY, 0); | |
432 memset(v, '\0', sizeof (vs_t)); | |
433 internal->decoder_private = v; | |
434 | |
435 v->rate = -1; | |
436 if (!voc_get_block(sample)) | |
437 { | |
438 free(v); | |
439 return(0); | |
440 } /* if */ | |
441 | |
442 if (v->rate == -1) | |
443 { | |
444 Sound_SetError("VOC data had no sound!"); | |
445 free(v); | |
446 return(0); | |
447 } /* if */ | |
448 | |
62
b13fafb976be
Changed _D macro to DBGSND.
Ryan C. Gordon <icculus@icculus.org>
parents:
47
diff
changeset
|
449 SNDDBG(("VOC: Accepting data stream.\n")); |
14 | 450 sample->actual.format = (v->size == ST_SIZE_WORD) ? AUDIO_S16LSB:AUDIO_U8; |
451 sample->actual.channels = v->channels; | |
452 sample->flags = SOUND_SAMPLEFLAG_NONE; | |
453 return(1); | |
454 } /* VOC_open */ | |
455 | |
456 | |
457 static void VOC_close(Sound_Sample *sample) | |
458 { | |
459 Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; | |
460 free(internal->decoder_private); | |
461 } /* VOC_close */ | |
462 | |
463 | |
464 static Uint32 VOC_read(Sound_Sample *sample) | |
465 { | |
466 Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; | |
467 vs_t *v = (vs_t *) internal->decoder_private; | |
468 | |
469 v->bufpos = 0; | |
470 while (v->bufpos < internal->buffer_size) | |
471 { | |
22
f6e679afe88b
Byte ordering fix, changed voc_read to voc_read_waveform, and cleaned up
Ryan C. Gordon <icculus@icculus.org>
parents:
14
diff
changeset
|
472 Uint32 rc = voc_read_waveform(sample); |
14 | 473 if (rc == 0) /* !!! FIXME: Could be an error... */ |
474 { | |
475 sample->flags |= SOUND_SAMPLEFLAG_EOF; | |
476 break; | |
477 } /* if */ | |
478 | |
479 if (!voc_get_block(sample)) | |
480 { | |
481 sample->flags |= SOUND_SAMPLEFLAG_ERROR; | |
482 break; | |
483 } /* if */ | |
484 } /* while */ | |
485 | |
486 return(v->bufpos); | |
487 } /* VOC_read */ | |
488 | |
64
40006625142a
Changes in preparation of autoconf support.
Ryan C. Gordon <icculus@icculus.org>
parents:
62
diff
changeset
|
489 #endif /* SOUND_SUPPORTS_VOC */ |
14 | 490 |
491 /* end of voc.c ... */ |