kwave
18.07.70
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
f
h
i
l
m
o
p
r
s
t
u
w
y
z
Functions
Typedefs
Enumerations
+
Enumerator
a
b
c
f
i
l
o
p
r
s
u
w
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
+
Variables
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
x
y
z
Typedefs
Enumerations
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Related Functions
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
i
l
m
p
q
r
s
t
x
z
Variables
Typedefs
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
WavFileFormat.h
Go to the documentation of this file.
1
/***************************************************************************
2
WavFileFormat.h - format of a wav file
3
-------------------
4
begin : Mar 05 2002
5
copyright : (C) 2002 by Thomas Eschenbacher
6
email : Thomas Eschenbacher <thomas.eschenbacher@gmx.de>
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef WAV_FILE_FORMAT_H
19
#define WAV_FILE_FORMAT_H
20
21
#include <QList>
22
23
#include "
libkwave/Compression.h
"
24
25
namespace
Kwave
26
{
27
28
typedef
enum
/* Here is the list of known format tags */
29
{
30
WAVE_FORMAT_UNKNOWN
= 0x0000,
/* Microsoft Corporation */
31
WAVE_FORMAT_PCM
= 0x0001,
/* Microsoft PCM format */
32
33
WAVE_FORMAT_MS_ADPCM
= 0x0002,
/* Microsoft ADPCM */
34
WAVE_FORMAT_IEEE_FLOAT
= 0x0003,
/* Micrososft 32 bit float format */
35
36
WAVE_FORMAT_IBM_CVSD
= 0x0005,
/* IBM Corporation */
37
WAVE_FORMAT_ALAW
= 0x0006,
/* Microsoft Corporation */
38
WAVE_FORMAT_MULAW
= 0x0007,
/* Microsoft Corporation */
39
WAVE_FORMAT_OKI_ADPCM
= 0x0010,
/* OKI */
40
WAVE_FORMAT_IMA_ADPCM
= 0x0011,
/* Intel Corporation */
41
WAVE_FORMAT_MEDIASPACE_ADPCM
= 0x0012,
/* Videologic */
42
WAVE_FORMAT_SIERRA_ADPCM
= 0x0013,
/* Sierra Semiconductor Corp */
43
WAVE_FORMAT_G723_ADPCM
= 0x0014,
/* Antex Electronics Corporation */
44
WAVE_FORMAT_DIGISTD
= 0x0015,
/* DSP Solutions, Inc. */
45
WAVE_FORMAT_DIGIFIX
= 0x0016,
/* DSP Solutions, Inc. */
46
WAVE_FORMAT_DIALOGIC_OKI_ADPCM
= 0x0017,
/* Dialogic Corporation */
47
WAVE_FORMAT_MEDIAVISION_ADPCM
= 0x0018,
/* Media Vision, Inc. */
48
49
WAVE_FORMAT_YAMAHA_ADPCM
= 0x0020,
/* Yamaha Corporation of America */
50
WAVE_FORMAT_SONARC
= 0x0021,
/* Speech Compression */
51
WAVE_FORMAT_DSPGROUP_TRUESPEECH
= 0x0022,
/* DSP Group, Inc */
52
WAVE_FORMAT_ECHOSC1
= 0x0023,
/* Echo Speech Corporation */
53
WAVE_FORMAT_AUDIOFILE_AF18
= 0x0024,
/* Audiofile, Inc. */
54
WAVE_FORMAT_APTX
= 0x0025,
/* Audio Processing Technology */
55
WAVE_FORMAT_AUDIOFILE_AF10
= 0x0026,
/* Audiofile, Inc. */
56
57
WAVE_FORMAT_DOLBY_AC2
= 0x0030,
/* Dolby Laboratories */
58
WAVE_FORMAT_GSM610
= 0x0031,
/* Microsoft Corporation */
59
WAVE_FORMAT_MSNAUDIO
= 0x0032,
/* Microsoft Corporation */
60
WAVE_FORMAT_ANTEX_ADPCME
= 0x0033,
/* Antex Electronics Corporation */
61
WAVE_FORMAT_CONTROL_RES_VQLPC
= 0x0034,
/* Control Resources Limited */
62
WAVE_FORMAT_DIGIREAL
= 0x0035,
/* DSP Solutions, Inc. */
63
WAVE_FORMAT_DIGIADPCM
= 0x0036,
/* DSP Solutions, Inc. */
64
WAVE_FORMAT_CONTROL_RES_CR10
= 0x0037,
/* Control Resources Limited */
65
WAVE_FORMAT_NMS_VBXADPCM
= 0x0038,
/* Natural MicroSystems */
66
WAVE_FORMAT_ROCKWELL_ADPCM
= 0x003B,
/* Rockwell International */
67
WAVE_FORMAT_ROCKWELL_DIGITALK
= 0x003C,
/* Rockwell International */
68
69
WAVE_FORMAT_G721_ADPCM
= 0x0040,
/* Antex Electronics Corporation */
70
WAVE_FORMAT_MPEG
= 0x0050,
/* Microsoft Corporation */
71
72
WAVE_FORMAT_MPEGLAYER3
= 0x0055,
/* MPEG 3 Layer 1 */
73
74
WAVE_FORMAT_IBM_MULAW
= 0x0101,
/* IBM mu-law format */
75
WAVE_FORMAT_IBM_ALAW
= 0x0102,
/* IBM a-law format */
76
WAVE_FORMAT_IBM_ADPCM
= 0x0103,
/* IBM AVC Adaptive Differential PCM format */
77
78
WAVE_FORMAT_CREATIVE_ADPCM
= 0x0200,
/* Creative Labs, Inc */
79
80
WAVE_FORMAT_FM_TOWNS_SND
= 0x0300,
/* Fujitsu Corp. */
81
WAVE_FORMAT_OLIGSM
= 0x1000,
/* Ing C. Olivetti & C., S.p.A. */
82
WAVE_FORMAT_OLIADPCM
= 0x1001,
/* Ing C. Olivetti & C., S.p.A. */
83
WAVE_FORMAT_OLICELP
= 0x1002,
/* Ing C. Olivetti & C., S.p.A. */
84
WAVE_FORMAT_OLISBC
= 0x1003,
/* Ing C. Olivetti & C., S.p.A. */
85
WAVE_FORMAT_OLIOPR
= 0x1004,
/* Ing C. Olivetti & C., S.p.A. */
86
87
WAVE_FORMAT_EXTENSIBLE
= 0xFFFE
88
}
wav_format_id
;
89
90
// header format for writing primitive canonical wav files
91
typedef
struct
{
92
qint8 riffid[4];
93
quint32
filelength
;
94
qint8 wavid[4];
95
qint8 fmtid[4];
96
quint32
fmtlength
;
97
qint16
mode
;
98
qint16
channels
;
99
quint32
rate
;
100
quint32
AvgBytesPerSec
;
101
qint16
BlockAlign
;
102
qint16
bitspersample
;
103
}
wav_header_t
;
104
105
//typedef struct {
106
// qint16 mode; // Format tag: 1 = PCM
107
// qint16 channels;
108
// quint32 rate;
109
// quint32 AvgBytesPerSec; // sample rate * block align
110
// qint16 BlockAlign; // channels * bits/sample / 8
111
// qint16 bitspersample;
112
//} wav_fmt_header_t;
113
114
typedef
struct
{
115
qint16
format
;
116
qint16
channels
;
117
quint32
samplerate
;
118
quint32
bytespersec
;
119
qint16
blockalign
;
120
qint16
bitwidth
;
121
}
min_wav_header_t
;
122
123
// typedef struct {
124
// qint16 format;
125
// qint16 channels;
126
// quint32 samplerate;
127
// quint32 bytespersec;
128
// qint16 blockalign;
129
// qint16 bitwidth;
130
// qint16 extrabytes;
131
// qint16 dummy;
132
// } wav_fmt_size20_header_t;
133
134
// typedef struct {
135
// qint16 format;
136
// qint16 channels;
137
// quint32 samplerate;
138
// quint32 bytespersec;
139
// qint16 blockalign;
140
// qint16 bitwidth;
141
// qint16 extrabytes;
142
// qint16 samplesperblock;
143
// qint16 numcoeffs;
144
// struct {
145
// qint16 coeff1;
146
// qint16 coeff2;
147
// }
148
// coeffs [7];
149
// } ms_adpcm_wav_header_t;
150
151
// typedef struct {
152
// qint16 format;
153
// qint16 channels;
154
// quint32 samplerate;
155
// quint32 bytespersec;
156
// qint16 blockalign;
157
// qint16 bitwidth;
158
// qint16 extrabytes;
159
// qint16 samplesperblock;
160
// } ima_adpcm_wav_header_t;
161
162
// typedef struct {
163
// quint32 esf_field1;
164
// qint16 esf_field2;
165
// qint16 esf_field3;
166
// quint8 esf_field4 [8];
167
// } ext_subformat_t;
168
169
// typedef struct {
170
// qint16 format;
171
// qint16 channels;
172
// quint32 samplerate;
173
// quint32 bytespersec;
174
// qint16 blockalign;
175
// qint16 bitwidth;
176
// qint16 extrabytes;
177
// qint16 validbits;
178
// quint32 channelmask;
179
// Kwave::ext_subformat_t esf;
180
// } extensible_wav_header_t;
181
182
typedef
union
{
183
// qint16 format;
184
Kwave::min_wav_header_t
min
;
185
// Kwave::ima_adpcm_wav_header_t ima;
186
// Kwave::ms_adpcm_wav_header_t msadpcm;
187
// Kwave::extensible_wav_header_t ext;
188
// Kwave::wav_fmt_size20_header_t size20;
189
quint8 padding[512];
190
}
wav_fmt_header_t
;
191
192
// typedef struct {
193
// quint32 samples;
194
// } fact_chunk_t;
195
199
QList<Kwave::Compression::Type>
audiofileCompressionTypes
();
200
201
}
202
203
/* defined in RFC 2361 and other places */
204
#define REGISTER_MIME_TYPES \
205
addMimeType( \
206
"audio/x-wav, audio/vnd.wave, audio/wav", \
207
i18n("WAV audio"), \
208
"*.wav" \
209
);
210
211
#define REGISTER_COMPRESSION_TYPES \
212
foreach (Kwave::Compression::Type c, Kwave::audiofileCompressionTypes()) \
213
addCompression(c);
214
215
#endif
/* WAV_FILE_FORMAT_H */
216
217
//***************************************************************************
218
//***************************************************************************
Kwave::WAVE_FORMAT_MPEG
Definition:
WavFileFormat.h:70
Kwave::wav_header_t
Definition:
WavFileFormat.h:91
Kwave::WAVE_FORMAT_IBM_ALAW
Definition:
WavFileFormat.h:75
Kwave::WAVE_FORMAT_YAMAHA_ADPCM
Definition:
WavFileFormat.h:49
Kwave::min_wav_header_t::channels
qint16 channels
Definition:
WavFileFormat.h:116
Compression.h
Kwave::WAVE_FORMAT_GSM610
Definition:
WavFileFormat.h:58
Kwave::WAVE_FORMAT_DIGIFIX
Definition:
WavFileFormat.h:45
Kwave::WAVE_FORMAT_MEDIASPACE_ADPCM
Definition:
WavFileFormat.h:41
Kwave::WAVE_FORMAT_AUDIOFILE_AF10
Definition:
WavFileFormat.h:55
Kwave::wav_header_t::fmtlength
quint32 fmtlength
Definition:
WavFileFormat.h:96
Kwave
Definition:
App.h:33
Kwave::WAVE_FORMAT_ROCKWELL_ADPCM
Definition:
WavFileFormat.h:66
Kwave::WAVE_FORMAT_OLICELP
Definition:
WavFileFormat.h:83
Kwave::WAVE_FORMAT_CONTROL_RES_CR10
Definition:
WavFileFormat.h:64
Kwave::wav_header_t::filelength
quint32 filelength
Definition:
WavFileFormat.h:93
Kwave::WAVE_FORMAT_DSPGROUP_TRUESPEECH
Definition:
WavFileFormat.h:51
Kwave::WAVE_FORMAT_OLIOPR
Definition:
WavFileFormat.h:85
Kwave::wav_header_t::BlockAlign
qint16 BlockAlign
Definition:
WavFileFormat.h:101
Kwave::wav_header_t::bitspersample
qint16 bitspersample
Definition:
WavFileFormat.h:102
Kwave::WAVE_FORMAT_MPEGLAYER3
Definition:
WavFileFormat.h:72
Kwave::min_wav_header_t::format
qint16 format
Definition:
WavFileFormat.h:115
Kwave::WAVE_FORMAT_G721_ADPCM
Definition:
WavFileFormat.h:69
Kwave::WAVE_FORMAT_PCM
Definition:
WavFileFormat.h:31
Kwave::WAVE_FORMAT_NMS_VBXADPCM
Definition:
WavFileFormat.h:65
Kwave::WAVE_FORMAT_CONTROL_RES_VQLPC
Definition:
WavFileFormat.h:61
Kwave::WAVE_FORMAT_MS_ADPCM
Definition:
WavFileFormat.h:33
Kwave::min_wav_header_t::samplerate
quint32 samplerate
Definition:
WavFileFormat.h:117
Kwave::WAVE_FORMAT_CREATIVE_ADPCM
Definition:
WavFileFormat.h:78
Kwave::WAVE_FORMAT_OLIADPCM
Definition:
WavFileFormat.h:82
Kwave::WAVE_FORMAT_SIERRA_ADPCM
Definition:
WavFileFormat.h:42
Kwave::WAVE_FORMAT_IBM_ADPCM
Definition:
WavFileFormat.h:76
Kwave::wav_fmt_header_t
Definition:
WavFileFormat.h:182
Kwave::WAVE_FORMAT_IMA_ADPCM
Definition:
WavFileFormat.h:40
Kwave::WAVE_FORMAT_ALAW
Definition:
WavFileFormat.h:37
Kwave::WAVE_FORMAT_MEDIAVISION_ADPCM
Definition:
WavFileFormat.h:47
Kwave::min_wav_header_t::bitwidth
qint16 bitwidth
Definition:
WavFileFormat.h:120
Kwave::WAVE_FORMAT_ANTEX_ADPCME
Definition:
WavFileFormat.h:60
Kwave::WAVE_FORMAT_AUDIOFILE_AF18
Definition:
WavFileFormat.h:53
Kwave::wav_header_t::AvgBytesPerSec
quint32 AvgBytesPerSec
Definition:
WavFileFormat.h:100
Kwave::wav_fmt_header_t::min
Kwave::min_wav_header_t min
Definition:
WavFileFormat.h:184
Kwave::WAVE_FORMAT_EXTENSIBLE
Definition:
WavFileFormat.h:87
Kwave::WAVE_FORMAT_OKI_ADPCM
Definition:
WavFileFormat.h:39
Kwave::min_wav_header_t::blockalign
qint16 blockalign
Definition:
WavFileFormat.h:119
Kwave::min_wav_header_t::bytespersec
quint32 bytespersec
Definition:
WavFileFormat.h:118
Kwave::WAVE_FORMAT_DIGIADPCM
Definition:
WavFileFormat.h:63
Kwave::WAVE_FORMAT_ROCKWELL_DIGITALK
Definition:
WavFileFormat.h:67
Kwave::WAVE_FORMAT_UNKNOWN
Definition:
WavFileFormat.h:30
Kwave::wav_header_t::channels
qint16 channels
Definition:
WavFileFormat.h:98
Kwave::WAVE_FORMAT_G723_ADPCM
Definition:
WavFileFormat.h:43
Kwave::WAVE_FORMAT_DIALOGIC_OKI_ADPCM
Definition:
WavFileFormat.h:46
Kwave::WAVE_FORMAT_IEEE_FLOAT
Definition:
WavFileFormat.h:34
Kwave::WAVE_FORMAT_DIGIREAL
Definition:
WavFileFormat.h:62
Kwave::WAVE_FORMAT_OLISBC
Definition:
WavFileFormat.h:84
Kwave::WAVE_FORMAT_OLIGSM
Definition:
WavFileFormat.h:81
Kwave::WAVE_FORMAT_MSNAUDIO
Definition:
WavFileFormat.h:59
Kwave::wav_format_id
wav_format_id
Definition:
WavFileFormat.h:28
Kwave::WAVE_FORMAT_MULAW
Definition:
WavFileFormat.h:38
Kwave::WAVE_FORMAT_FM_TOWNS_SND
Definition:
WavFileFormat.h:80
Kwave::WAVE_FORMAT_IBM_CVSD
Definition:
WavFileFormat.h:36
Kwave::WAVE_FORMAT_ECHOSC1
Definition:
WavFileFormat.h:52
Kwave::WAVE_FORMAT_IBM_MULAW
Definition:
WavFileFormat.h:74
Kwave::WAVE_FORMAT_SONARC
Definition:
WavFileFormat.h:50
Kwave::audiofileCompressionTypes
QList< Kwave::Compression::Type > audiofileCompressionTypes()
Definition:
WavFileFormat.cpp:26
Kwave::WAVE_FORMAT_DOLBY_AC2
Definition:
WavFileFormat.h:57
Kwave::min_wav_header_t
Definition:
WavFileFormat.h:114
Kwave::wav_header_t::mode
qint16 mode
Definition:
WavFileFormat.h:97
Kwave::WAVE_FORMAT_APTX
Definition:
WavFileFormat.h:54
Kwave::wav_header_t::rate
quint32 rate
Definition:
WavFileFormat.h:99
Kwave::WAVE_FORMAT_DIGISTD
Definition:
WavFileFormat.h:44
plugins
codec_wav
WavFileFormat.h
Generated on Sat Mar 24 2018 09:10:26 for kwave by
1.8.13