Link Here
|
60 |
are in only in this combination, so I combined them in one header; |
60 |
are in only in this combination, so I combined them in one header; |
61 |
it works on all WAVE-file I have |
61 |
it works on all WAVE-file I have |
62 |
*/ |
62 |
*/ |
|
|
63 |
typedef unsigned int u_long32; |
64 |
|
63 |
typedef struct wavhead |
65 |
typedef struct wavhead |
64 |
{ |
66 |
{ |
65 |
u_long main_chunk; /* 'RIFF' */ |
67 |
u_long32 main_chunk; /* 'RIFF' */ |
66 |
u_long length; /* Length of rest of file */ |
68 |
u_long32 length; /* Length of rest of file */ |
67 |
u_long chunk_type; /* 'WAVE' */ |
69 |
u_long32 chunk_type; /* 'WAVE' */ |
68 |
|
70 |
|
69 |
u_long sub_chunk; /* 'fmt ' */ |
71 |
u_long32 sub_chunk; /* 'fmt ' */ |
70 |
u_long sc_len; /* length of sub_chunk, =16 (rest of chunk) */ |
72 |
u_long32 sc_len; /* length of sub_chunk, =16 (rest of chunk) */ |
71 |
u_short format; /* should be 1 for PCM-code */ |
73 |
u_short format; /* should be 1 for PCM-code */ |
72 |
u_short modus; /* 1 Mono, 2 Stereo */ |
74 |
u_short modus; /* 1 Mono, 2 Stereo */ |
73 |
u_long sample_fq; /* frequence of sample */ |
75 |
u_long32 sample_fq; /* frequence of sample */ |
74 |
u_long byte_p_sec; |
76 |
u_long32 byte_p_sec; |
75 |
u_short byte_p_spl; /* samplesize; 1 or 2 bytes */ |
77 |
u_short byte_p_spl; /* samplesize; 1 or 2 bytes */ |
76 |
u_short bit_p_spl; /* 8, 12 or 16 bit */ |
78 |
u_short bit_p_spl; /* 8, 12 or 16 bit */ |
77 |
|
79 |
|
78 |
u_long data_chunk; /* 'data' */ |
80 |
u_long32 data_chunk; /* 'data' */ |
79 |
u_long data_length; /* samplecount (lenth of rest of block?) */ |
81 |
u_long32 data_length; /* samplecount (lenth of rest of block?) */ |
80 |
} |
82 |
} |
81 |
wavhead; |
83 |
wavhead; |
82 |
|
84 |
|