libgig  4.3.0
RIFF Namespace Reference

RIFF specific classes and definitions. More...

Classes

struct  progress_t
 Used for indicating the progress of a certain task. More...
 
class  Chunk
 Ordinary RIFF Chunk. More...
 
class  List
 RIFF List Chunk. More...
 
class  File
 RIFF File. More...
 
class  Exception
 Will be thrown whenever an error occurs while handling a RIFF file. More...
 

Typedefs

typedef std::string String
 
typedef uint64_t file_offset_t
 Type used by libgig for handling file positioning during file I/O tasks.
 

Enumerations

enum  stream_mode_t { stream_mode_read = 0 , stream_mode_read_write = 1 , stream_mode_closed = 2 }
 Whether file stream is open in read or in read/write mode.
 
enum  stream_state_t { stream_ready = 0 , stream_end_reached = 1 , stream_closed = 2 }
 Current state of the file stream.
 
enum  stream_whence_t { stream_start = 0 , stream_curpos = 1 , stream_backward = 2 , stream_end = 3 }
 File stream position dependent to these relations.
 
enum  endian_t { endian_little = 0 , endian_big = 1 , endian_native = 2 }
 Alignment of data bytes in memory (system dependant).
 
enum  layout_t { layout_standard = 0 , layout_flat = 1 }
 General RIFF chunk structure of a RIFF file. More...
 
enum  offset_size_t { offset_size_auto = 0 , offset_size_32bit = 4 , offset_size_64bit = 8 }
 Size of RIFF file offsets used in all RIFF chunks' headers. More...
 

Functions

String libraryName ()
 Returns the name of this C++ library. More...
 
String libraryVersion ()
 Returns version of this C++ library. More...
 

Detailed Description

RIFF specific classes and definitions.

The Resource Interchange File Format (RIFF) is a generic tree-structured meta-format which stores data in so called "chunks". It can be compared to XML, but in contrast to XML, RIFF is entirely binary encoded, that is not ASCII based. RIFF is used as basis for many file formats like AVI, WAV, DLS and of course the Gigasampler file format. ;-)

RIFF chunks can be seen as containers for data. There are two distinct types of chunks:

  • ordinary chunks are the leafs of the data tree which encapsulate the actual data of the file (i.e. the sample data of a .wav file)
  • list chunks are the nodes of the data tree which hold an arbitrary amount of subchunks (can be both, list chunks and/or ordinary chunks)

Enumeration Type Documentation

◆ layout_t

General RIFF chunk structure of a RIFF file.

Enumerator
layout_standard 

Standard RIFF file layout: First chunk in file is a List chunk which contains all other chunks and there are no chunks outside the scope of that very first (List) chunk.

layout_flat 

Not a "real" RIFF file: First chunk in file is an ordinary data chunk, not a List chunk, and there might be other chunks after that first chunk.

Definition at line 192 of file RIFF.h.

◆ offset_size_t

Size of RIFF file offsets used in all RIFF chunks' headers.

See also
File::GetFileOffsetSize()
Enumerator
offset_size_auto 

Use 32 bit offsets for files smaller than 4 GB, use 64 bit offsets for files equal or larger than 4 GB.

offset_size_32bit 

Always use 32 bit offsets (even for files larger than 4 GB).

offset_size_64bit 

Always use 64 bit offsets (even for files smaller than 4 GB).

Definition at line 198 of file RIFF.h.

Function Documentation

◆ libraryName()

String RIFF::libraryName ( )

Returns the name of this C++ library.

This is usually "libgig" of course. This call is equivalent to DLS::libraryName() and gig::libraryName().

Definition at line 2367 of file RIFF.cpp.

◆ libraryVersion()

String RIFF::libraryVersion ( )

Returns version of this C++ library.

This call is equivalent to DLS::libraryVersion() and gig::libraryVersion().

Definition at line 2375 of file RIFF.cpp.