[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.6 Mix_QuickLoad_RAW

Mix_Chunk *Mix_QuickLoad_RAW(Uint8 *mem)

mem
Memory buffer containing a WAVE file in output format.

Load mem as a raw sample. The data in mem must be already in the output format. If you aren't sure what you are doing, this is not a good function for you!
Note: This function does very little checking. If the format mismatches the output format it will not return an error. This is probably a dangerous function to use.

Returns: a pointer to the sample as a Mix_Chunk. NULL is returned on errors, such as when out of memory.

 
// quick-load a raw sample from memory
// Uint8 *raw; // I assume you have the raw data here,
                // or compiled in the program...
Mix_Chunk *raw_chunk;
if(!(raw_chunk=Mix_QuickLoad_RAW(raw))) {
    printf("Mix_QuickLoad_RAW: %s\n", Mix_GetError());
    // handle error
}

See Also:
4.2.3 Mix_LoadWAV, 4.2.5 Mix_QuickLoad_WAV, 4.2.8 Mix_FreeChunk



This document was generated on November, 13 2009 using texi2html