diff options
author | Shaun Ruffell <sruffell@digium.com> | 2009-06-25 15:09:47 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2009-06-25 15:09:47 +0000 |
commit | 4a3770a38ed79400efd3d530c28647bc407569f0 (patch) | |
tree | 4b3cea29e4da89e7ca0c3ccf38f395e1f12d935c /wavformat.h | |
parent | 06df0855ebc6e2af09652eef50d0165353377ac7 (diff) |
dahdi_monitor: I forgot to add waveformat.h
This should have been in the last commit.
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@6719 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'wavformat.h')
-rw-r--r-- | wavformat.h | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/wavformat.h b/wavformat.h new file mode 100644 index 0000000..ea69e64 --- /dev/null +++ b/wavformat.h @@ -0,0 +1,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 |