aiffc.h
2.15 KB
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
#ifndef __aiffc__
#define __aiffc__
#define IFF_ID_FORM 'FORM'
#define IFF_ID_AIFC 'AIFC'
#define IFF_ID_AIFF 'AIFF'
#define IFF_ID_COMM 'COMM'
#define IFF_ID_SSND 'SSND'
#define IFF_ID_INST 'INST'
#define IFF_ID_APPL 'APPL'
#define IFF_ID_MARK 'MARK'
#define CODE_NAME "VADPCMCODES"
#define LOOP_NAME "VADPCMLOOPS"
#define VERSION 1
#define NoLooping 0
#define ForwardLooping 1
#define ForwardBackwardLooping 2
typedef struct {
unsigned long ckID;
long ckSize;
} ChunkHeader;
typedef struct {
unsigned long ckID;
long ckSize;
unsigned long formType;
} Chunk;
typedef struct {
short numChannels;
unsigned short numFramesH;
unsigned short numFramesL;
short sampleSize;
char sampleRate[10];
unsigned short compressionTypeH; // Separated into HL to prevent alignment
unsigned short compressionTypeL; /* note: string follows */
} CommonChunk;
typedef short MarkerID;
typedef struct {
MarkerID id;
unsigned short positionH; // Separated into HL to prevent alignment
unsigned short positionL; /* note: pstring follows */
} Marker;
typedef struct {
short playMode;
MarkerID beginLoop;
MarkerID endLoop;
} Loop;
typedef struct {
char baseNote;
char detune;
char lowNote;
char highNote;
char lowVelocity;
char highVelocity;
short gain;
Loop sustainLoop;
Loop releaseLoop;
} InstrumentChunk;
typedef struct {
unsigned long offset;
unsigned long blockSize;
} SoundDataChunk;
typedef struct {
unsigned long hi;
unsigned long lo;
} IEEE_DBL;
typedef struct {
unsigned long l1;
unsigned long l2;
unsigned short s1;
} SANE_EXT;
#endif // __aiffc__