Follow us on Facebook
Follow us on Twitter
Signalogic on LinkedIn

Home > Tech Support > Waveform File Formats

Audio Waveform File Formats

Microsoft Waveform File Format

The "standard" Microsoft .WAV file format, unless modified by user defined extension, is exclusively a time domain format. This includes .WAV files typically used with WinXP and other versions of Window and popular off-the shelf multimedia products. The standard format contains a simple 44-byte header, which allocates no values for frequency domain information, wavelet domain information, or other math/DSP analysis purposes. Although the .WAV format is theoretically a subset of the general Microsoft RIFF format, and can thus be extended to contain user-defined header and data sections, experience shows that many off-the-shelf software packages fail to safely ignore non-standard sections, and may crash or process incorrect data.

One significant advantage of the .WAV format is inclusion of the "Format/Compression" header attribute, which provides support for a range of PCM and compressed data types, ranging from 16-bit linear to voice codec such as G.729, ADPCM, iLBC, and others.

Below is a quick reference for the standard .WAV file format. See the Microsoft Windows Multimedia Programmer's Reference, chapter 8, for detailed information on the .WAV format.

Table 1, Microsoft WAVE File Format Quick Reference


Name

Word Offset 1

Size / Type

SHORT HEADER

'RIFF' section tag 2

0

4 bytes

Length of RIFF section

2

doubleword

'WAVE' Format Identifier

4

4 bytes

'fmt ' section tag

6

4 bytes

Length of fmt section

8

doubleword

Format/Compression 10 (See table below for details)

word

Number of Channels

11

integer

Sampling Frequency (in Hz)

Average Bytes Per Second 3

Block Alignment 4

12

14

16

doubleword

doubleword

integer

Precision (Number of bits per sample, typically 8 or 16)

17

word

'data' section tag

Length of data section (NB)

Start of Waveform Data

18

20

22

4 bytes

doubleword

NB/2 words

_______________________________________________________________________________________________

Total                                                         44 bytes

Notes

1 Unless otherwise mentioned, words are 16-bit unsigned integers ranging in value from 0..65535, integers are 16-bit values ranging from -32768..32767, doublewords are 32-bit unsigned integers ranging in value from 0..4294967295, singles are IEEE format 32-bit floating-point values, and doubles are IEEE format 64-bit floating-point values.

2 Header elements enclosed in single-quote marks indicate actual, exact text in the .WAV header.

3Avg bytes per sec is typically determined by the formula:

        Avgbps = Number of channels * Sampling Frequency * (Precision >> 3)

4 Block Alignment is typically given by the formula:

        blkalign = Number of channels * (Precision >> 3)

Wav Header Limitations

There are several limitations to the de facto standard 44-byte header .WAV format found in use with many multimedia programs. One of the most noticeable is the lack of maximum amplitude value, which causes .WAV files to be displayed and processed in Hypersignal and other signal analysis software as if they always contained full-scale values. Another is lack of frequency or wavelet domain information. These are limitations when working with Hypersignal or DirectCore® software.  When using these software packages, it is recommended to convert .WAV files into Hypersignal .TIM format one of the following ways:

1. Use the Wav2Tim conversion function in Hypersignal Macro.

2. Use File Acquisition function in Hypersignal.

3. Use the .WAV file as direct input into Hypersignal or DirectCore function, by specifying the .WAV extension explicitly in an input waveform filename field.

Table 2, WAVE File Header Format/Compression Codes

Code

Format/Compression Type

0x0000

unknown

0x0001

Linear PCM/uncompressed

0x0002

Microsoftt ADPCM

0x0003

IEEE floating-point

0x0005

IBM CVSD

0x0006

Microsoft ALAW (8-bit ITU-T G.711BA ALAW)

0x0007

Microsoft M-LAW (8-bit ITU-T G.711 M-LAW

0x0011

Intel IMA/DVI ADPCM

0x0016

ITU G.723 ADPCM

0x0017

Dialogic OKI ADPCM

0x0030

Dolby AAC

0x0031

Microsoft GSM 6.10

0x0036

Rockwell ADPCM

0x0040

ITU G.721 ADPCM

0x0042

Microsoft MSG723

0x0045

ITU-T G.726

0x0064

APICOM G.726 ADPCM

0x00101

IBM M-LAW

0x00102

IBM A-LAW

0x00103

IBM ADPCM

.au Waveform File Format

Hypersignal File Format

See also the topic Hypersignal Tim2Wav and Wav2Tim Waveform File Conversion, in Signalogic DSP Software System Guide section 1.2.1, Summary Of Hypersignal-Macro Series Software ◳.