blob: ea69e644f4094b9559011ef7efe437751a635ac0 (
plain)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
|
/*
* wavformat.h -- data structures and associated definitions for wav files
*
* By Michael Spiceland (mspiceland@digium.com)
*
* (C) 2009 Digium, Inc.
*/
/*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2 as published by the
* Free Software Foundation. See the LICENSE file included with
* this program for more details.
*/
#ifndef WAVFORMAT_H
#define WAVFORMAT_H
#include <stdint.h>
struct wavheader {
/* riff type chunk */
char riff_chunk_id[4];
uint32_t riff_chunk_size;
char riff_type[4];
/* format chunk */
char fmt_chunk_id[4];
uint32_t fmt_data_size;
uint16_t fmt_compression_code;
uint16_t fmt_num_channels;
uint32_t fmt_sample_rate;
uint32_t fmt_avg_bytes_per_sec;
uint16_t fmt_block_align;
uint16_t fmt_significant_bps;
//uint16_t fmt_extra_format_bytes; /* sox doesn't ouput this for PCM uncompressed */
/* data chunk */
char data_chunk_id[4];
uint32_t data_data_size;
} __attribute__((packed));
#endif
/*
* wavformat.h -- data structures and associated definitions for wav files
*
* By Michael Spiceland (mspiceland@digium.com)
*
* (C) 2009 Digium, Inc.
*/
/*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2 as published by the
* Free Software Foundation. See the LICENSE file included with
* this program for more details.
*/
#ifndef WAVFORMAT_H
#define WAVFORMAT_H
#include <stdint.h>
struct wavheader {
/* riff type chunk */
char riff_chunk_id[4];
uint32_t riff_chunk_size;
char riff_type[4];
/* format chunk */
char fmt_chunk_id[4];
uint32_t fmt_data_size;
uint16_t fmt_compression_code;
uint16_t fmt_num_channels;
uint32_t fmt_sample_rate;
uint32_t fmt_avg_bytes_per_sec;
uint16_t fmt_block_align;
uint16_t fmt_significant_bps;
//uint16_t fmt_extra_format_bytes; /* sox doesn't ouput this for PCM uncompressed */
/* data chunk */
char data_chunk_id[4];
uint32_t data_data_size;
} __attribute__((packed));
#endif
|