Data chunk (of a Wave file)


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

Byte sequence descriptionLength in bytesStarts at byte in the chunkValue
chunk ID40x00The ASCII character string "data"
size40x04The 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
datavarious0x08The 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

Rate This Page: Poor Great   |  Rate Content |
Average rating:  3   
Number of Ratings : 1
Add Comment
No Comments Yet

Copyright 2006 by Kaliopa Publishing, LLC