blob: b8daeee40c013f75c670524eef062ddd2f695e30 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
/**********************************************************************
* (c) 1996 Voxware, Inc. All Rights Reserved. This file contains
* proprietary information of trade secrets of Voxware, Inc. and may
* not be distributed without the authorization of Voxware, Inc.
**********************************************************************
*
* File: VOXCHUNK.H
* Purpose: Types and #defines which describe the handling of
* the INFO chunks in the vox files.
* Created: 5/29/96 - George T. Talbot
* Modified: 6/17/96 - GTT - Added code to set lengths to -1 on
* the VOXCHUNK_SET() macro so that
* the default behaviour is to read
* existing info data.
* Notes:
*
**********************************************************************/
#ifndef _VOXCHUNK_H_
#define _VOXCHUNK_H_
typedef struct tagVox_Chunk_Info
{
unsigned long id;
long length;
char info[256];
} VOX_CHUNK_INFO;
// Important note: When adding a new VOXCHUNK_xxx, make sure to add
// the cooresponding elements to the gRIFF_VoxChunk_IDs[] and
// gAIFF_VoxChunk_IDs[] arrays in INFOCHNK.C
#define VOXCHUNK_NONE 0
#define VOXCHUNK_URL 1
#define VOXCHUNK_COPYRIGHT 2
#define VOXCHUNK_TITLE 3
#define VOXCHUNK_SOFTWARE 4
#define VOXCHUNK_AUTHOR 5
#define VOXCHUNK_COMMENT 6
#define VOXCHUNK_NUM_KINDS 7
// Convenience macros...
// Clear out a set of VOX_CHUNK_INFO records for use...
//
// Parameters are: _zz1 - Pointer to array of VOX_CHUNK_INFO.
// _zz2 - Number of elements in the array.
#define VOXCHUNK_SET(_zz1, _zz2) { \
memset((_zz1), 0, (_zz2) * sizeof(VOX_CHUNK_INFO)); \
for (short i=0; i<(_zz2); ++i) \
{ \
(_zz1)[i].length = -1; \
} \
}
// Write a C string into a VOX_CHUNK_INFO record...
//
// Parameters are: _zz1 - VOX_CHUNK_INFO record
// _zz2 - Chunk ID from above list
// _zz3 - A C string
#define VOXCHUNK_INFO(_zz1, _zz2, _zz3) \
{ \
(_zz1).id = (_zz2); \
(_zz1).length = strlen(_zz3)+1; \
memcpy((_zz1).info, (_zz3), (_zz1).length); \
}
#endif
|