|
BSAPI
|
Reads RIFF file format. More...
#include <bsapi.h>
Reads RIFF file format.
The Riff format is an universal binary format used mainly by Microsoft. The WAV, AVI and BMP formats are based on the RIFF format. Each file has a header consisted form 4 bytes 'RIFF' header and data length (4 bytes unsigned int). The format uses chunks to store data. Each chunk have a header consised from 4 bytes chunk ID (chars) and 4 bytes chunk length (unsigned int). There is a special chunk 'LIST' which can contain subchunks. The LIST chunk has an additonal 4 bytes list name. In additional if the chunk data does not have even length, there is an additional padding byte behind the chunk
'RIFF'(4B) file_len_in_bytes(unsigned int, - sizeof('RIFF') - sizeof(file_len_in_bytes)) chunk_id1(char, 4B) chunk_len_in_bytes1(unsigned int, -8B ID and len) chunk_data1 chuk_id2 chunk_len_in_bytes2 chunk_data2
chunk LIST 'LIST'(4B) list_len_in_bytes(unsigned int) chunk_id1(char, 4B) chunk_len1 chunk_data1 ...
1.7.5.1