Tao.Sdl SDK Documentation

SdlMixer.Mix_QuickLoad_RAW Method 

Load raw audio data of the mixer format from a memory buffer

[Visual Basic]
Public Shared Function Mix_QuickLoad_RAW( _
   ByVal mem As IntPtr, _
   ByVal len As Integer _
) As IntPtr
[C#]
public static IntPtr Mix_QuickLoad_RAW(
   IntPtr mem,
   int len
);

Parameters

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!
len

Return Value

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

Remarks

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.

Binds to C-function in SDL_mixer.h

Mix_Chunk *Mix_QuickLoad_RAW(Uint8 *mem)
            

Example

            // 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

SdlMixer Class | Tao.Sdl Namespace | Mix_LoadWAV | Mix_QuickLoad_WAV | Mix_FreeChunk