1 $NetBSD: patch-ac,v 1.3 2004/11/29 09:17:10 agc Exp $
5 --- fmtheaders.h.orig 2000-03-28 22:07:26.000000000 +0100
6 +++ fmtheaders.h 2004-11-29 09:12:19.000000000 +0000
9 #define VOC_MAGIC "Creative Voice File\032"
11 -#define DATALEN(bp) ((u_long)(bp.BlockLen[0]) | \
12 - ((u_long)(bp.BlockLen[1]) << 8) | \
13 - ((u_long)(bp.BlockLen[2]) << 16) )
14 +#define DATALEN(bp) ((u_int32_t)(bp.BlockLen[0]) | \
15 + ((u_int32_t)(bp.BlockLen[1]) << 8) | \
16 + ((u_int32_t)(bp.BlockLen[2]) << 16) )
18 typedef struct vochead
20 u_char Magic[20]; /* must be VOC_MAGIC */
21 - u_short BlockOffset; /* Offset to first block from top of file */
22 - u_short Version; /* VOC-file version */
23 - u_short IDCode; /* complement of version + 0x1234 */
24 + u_int16_t BlockOffset; /* Offset to first block from top of file */
25 + u_int16_t Version; /* VOC-file version */
26 + u_int16_t IDCode; /* complement of version + 0x1234 */
32 typedef struct blockT8
34 - u_short TimeConstant;
35 + u_int16_t TimeConstant;
50 typedef struct wavhead
52 - u_long main_chunk; /* 'RIFF' */
53 - u_long length; /* Length of rest of file */
54 - u_long chunk_type; /* 'WAVE' */
56 - u_long sub_chunk; /* 'fmt ' */
57 - u_long sc_len; /* length of sub_chunk, =16 (rest of chunk) */
58 - u_short format; /* should be 1 for PCM-code */
59 - u_short modus; /* 1 Mono, 2 Stereo */
60 - u_long sample_fq; /* frequence of sample */
62 - u_short byte_p_spl; /* samplesize; 1 or 2 bytes */
63 - u_short bit_p_spl; /* 8, 12 or 16 bit */
64 + u_int32_t main_chunk; /* 'RIFF' */
65 + u_int32_t length; /* Length of rest of file */
66 + u_int32_t chunk_type; /* 'WAVE' */
68 + u_int32_t sub_chunk; /* 'fmt ' */
69 + u_int32_t sc_len; /* length of sub_chunk, =16 (rest of chunk) */
70 + u_int16_t format; /* should be 1 for PCM-code */
71 + u_int16_t modus; /* 1 Mono, 2 Stereo */
72 + u_int32_t sample_fq; /* frequence of sample */
73 + u_int32_t byte_p_sec;
74 + u_int16_t byte_p_spl; /* samplesize; 1 or 2 bytes */
75 + u_int16_t bit_p_spl; /* 8, 12 or 16 bit */
77 - u_long data_chunk; /* 'data' */
78 - u_long data_length; /* samplecount (lenth of rest of block?) */
79 + u_int32_t data_chunk; /* 'data' */
80 + u_int32_t data_length; /* samplecount (lenth of rest of block?) */