Debian Codegraph @

engine/include/wav.h

raw
1 // ____ _ __
2 // / __ )____ _____ | | / /___ ___________
3 // / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
4 // / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
5 // /_____/\____/____/ |__/|__/\__,_/_/ /____/
6 //
7 // A futuristic real-time strategy game.
8 // This file is part of Bos Wars.
9 //
10 /**@name wav.h - The wav file format header file. */
11 //
12 // (c) Copyright 1998-2007 by Lutz Sammer
13 //
14 // This program is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation; only version 2 of the License.
17 //
18 // This program is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program; if not, write to the Free Software
25 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26 // 02111-1307, USA.
27
28 #ifndef __WAV_H__
29 #define __WAV_H__
30
31 //@{
32
33 /*----------------------------------------------------------------------------
34 -- Wav
35 ----------------------------------------------------------------------------*/
36
37 //
38 // Define values for WAV format
39 //
40
41 #define RIFF 0x46464952 /// "RIFF" chunk names.
42 #define WAVE 0x45564157 /// "WAVE" chunk names.
43 #define FMT 0x20746D66 /// "fmt " chunk names.
44 #define DATA 0x61746164 /// "data" chunk names.
45
46 /*
47 ** Wav types
48 */
49 #define WAV_UNKNOWN 0
50 #define WAV_PCM_CODE 1
51 #define WAV_ADPCM 2
52 #define WAV_ALAW 6
53 #define WAV_MULAW 7
54 #define WAV_OKI_ADPCM 16
55 #define WAV_DIGISTD 21
56 #define WAV_DIGIFIX 22
57
58 #define IBM_MULAW 0x0101
59 #define IBM_ALAW 0x0102
60 #define IBM_ADPCM 0x0103
61
62 #define WAV_MONO 1
63 #define WAV_STEREO 2
64
65 /**
66 ** Wav format
67 */
68 struct WavFMT {
69 unsigned int FMTchunk;
70 unsigned int FMTlength;
71 unsigned short Encoding; /// 1 = PCM
72 unsigned short Channels; /// 1 = mono, 2 = stereo
73 unsigned int Frequency; /// One of 11025, 22050, or 44100 Hz
74 unsigned int ByteRate; /// Average bytes per second
75 unsigned short SampleSize; /// Bytes per sample block
76 unsigned short BitsPerSample; /// One of 8, 12, 16
77 };
78
79 /**
80 ** General chunk found in the WAV file
81 */
82 struct WavChunk {
83 unsigned int Magic;
84 unsigned int Length;
85 };
86
87 //@}
88
89 #endif // !__WAV_H__