2 * Copyright (c) 2003, Marcus Overhagen
5 * Redistribution and use in source and binary forms, with or without modification,
6 * are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
22 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23 * OF THE POSSIBILITY OF SUCH DAMAGE.
30 uint32 riff_id
; // 'RIFF'
32 uint32 wave_id
; // 'WAVE'
45 uint32 samples_per_sec
;
46 uint32 avg_bytes_per_sec
;
48 uint16 bits_per_sample
;
51 struct wave_format_ex
{
54 uint32 samples_per_sec
;
55 uint32 avg_bytes_per_sec
;
57 uint16 bits_per_sample
;
59 uint8 extra_data
[64]; // allow for 64 bytes of extra data
62 struct mpeg3_wav_format
{
65 uint32 samples_per_sec
;
66 uint32 avg_bytes_per_sec
;
68 uint16 bits_per_sample
;
73 uint16 frames_per_block
;
77 struct mpeg1_wav_format
{
80 uint32 samples_per_sec
;
81 uint32 avg_bytes_per_sec
;
83 uint16 bits_per_sample
;
95 struct format_struct_extensible
97 uint16 format_tag
; // 0xfffe for extensible format
99 uint32 samples_per_sec
;
100 uint32 avg_bytes_per_sec
;
102 uint16 bits_per_sample
;
104 uint16 valid_bits_per_sample
;
106 uint8 guid
[16]; // first two bytes are format code
111 uint32 sample_length
;