Data chunk (of a Wave file)

The data chunk in the Wave file format has the following structure.

Byte sequence description Length in bytes Starts at byte in the chunk Value
chunk ID 4 0x00 The ASCII character string "data"
size 4 0x04 The size of the data chunk (number of bytes) less 8 (less the "chunk ID" and the "size"). This size is also the size of the sampled audio data. For example, a one second audio data recorded at 44,100 Hz on 1 channel with 16 bits sampling resolution will have 44100 * 1 * 16 / 8 = 88,200 bytes of data
data various 0x08 The sampled audio data

If there are more than one channels in the sampled audio data (see Format chunk (of a Wave file)), for example 2 channels, the sampled audio data is stored in the following order.

sample 0 for channel 1
sample 0 for channel 2
sample 1 for channel 1
sample 1 for channel 2
sample 2 for channel 1
sample 2 for channel 2

As with all information in wave files, data is stored little-endian. The number 88,200 = 0x00015888 will be stored as the byte sequence 0x88 0x58 0x01 0x00. Also, all information has to be word aligned (at every two bytes). If the audio data contains an odd number of bytes, it should be padded with a zero byte, although this byte will not be counted in the size variable.

See also:
Wave file format

Add new comment

Filtered HTML

  • Freelinking helps you easily create HTML links. Links take the form of [[indicator:target|Title]]. By default (no indicator): Click to view a local node.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.