Debian Codegraph @

src/libout123/wavhead.h

raw
1 /*
2 wavhead.h: wav file header, to be included twice for integer and float wavs
3
4 copyright ?-2015 by the mpg123 project - free software under the terms of the LGPL 2.1
5 see COPYING and AUTHORS files in distribution or http://mpg123.org
6 initially written by Samuel Audet
7 */
8
9 struct RIFF_STRUCT_NAME
10 {
11 byte riffheader[4];
12 byte WAVElen[4]; /* should this include riffheader or not? */
13 struct
14 {
15 byte WAVEID[4];
16 byte fmtheader[4];
17 byte fmtlen[4];
18 struct
19 {
20 byte FormatTag[2];
21 byte Channels[2];
22 byte SamplesPerSec[4];
23 byte AvgBytesPerSec[4];
24 byte BlockAlign[2];
25 byte BitsPerSample[2]; /* format specific for PCM */
26 #ifdef FLOATOUT
27 byte cbSize[2];
28 #endif
29 } fmt;
30 #ifdef FLOATOUT
31 byte factheader[4];
32 byte factlen[4];
33 struct
34 {
35 byte samplelen[4];
36 } fact;
37 #endif
38 struct
39 {
40 byte dataheader[4];
41 byte datalen[4];
42 /* from here you insert your PCM data */
43 } data;
44 } WAVE;
45 } const RIFF_NAME =
46 {
47 { 'R','I','F','F' } ,
48 { sizeof(RIFF_NAME.WAVE),0,0,0 } ,
49 {
50 { 'W','A','V','E' },
51 { 'f','m','t',' ' },
52 { sizeof(RIFF_NAME.WAVE.fmt),0,0,0 } ,
53 {
54 {WAVE_FORMAT,0} , {0,0},{0,0,0,0},{0,0,0,0},{0,0},{0,0}
55 #ifdef FLOATOUT
56 ,{0,0}
57 #endif
58 } ,
59 #ifdef FLOATOUT
60 { 'f','a','c','t' },
61 { sizeof(RIFF_NAME.WAVE.fact),0,0,0 },
62 {
63 {0,0,0,0} /* to be filled later, like datalen and wavelen */
64 },
65 #endif
66 { { 'd','a','t','a' } , {0,0,0,0} }
67 }
68 };