Tao.Sdl SDK Documentation

SdlMixer.Mix_FreeChunk Method 

Free an audio chunk previously loaded

[Visual Basic]
Public Shared Sub Mix_FreeChunk( _
   ByVal chunk As IntPtr _
)
[C#]
public static void Mix_FreeChunk(
   IntPtr chunk
);

Parameters

chunk
Pointer to the Mix_Chunk to free.

Remarks

Free the memory used in chunk, and free chunk itself as well. Do not use chunk after this without loading a new sample to it. Note: It's a bad idea to free a chunk that is still being played...

Binds to C-function in SDL_mixer.h

void Mix_FreeChunk(Mix_Chunk *chunk)
            

Example

            // free the sample
                    // Mix_Chunk *sample;
                    Mix_FreeChunk(sample);
                    sample=NULL; // to be safe...
                    

See Also

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