Mix Chunk (class)

Mix_Chunk - is an SDL Mixer's internal format of an audio chunk.

typedef struct Mix_Chunk { int allocated; Uint8 *abuf; Uint32 alen; Uint8 volume;    /* Per-sample volume, 0-128 */ } Mix_Chunk;

The internal format for an audio chunk. This stores the sample data, the length in bytes of that data, and the volume to use when mixing the sample.

To construct this class use the Audio.newMix_Chunk function to construct a global variable in your code (with null pointer). And use the Audio.SfxOpen(string fileName) function which loads the sound file into buffer and returns pointer to loaded chunk.

Links

 * Official SDL Mixer documentation