Mix_GetChunk

Name

Mix_GetChunk -- Get the chunk associated with a channel.

Synopsis

#include "SDL_mixer.h"

Mix_Chunk *Mix_GetChunk(int channel)

Description

Mix_GetChunk gets the most recent sample chunk pointer played on channel. This pointer may be currently playing, or just the last used.

Parameters

Return Value

Returns Pointer to the Mix_Chunk. NULL is returned if the channel is not allocated, or if the channel has not played any samples yet.

Note: The actual chunk may have been freed, so this pointer may not be valid anymore.

Example

// get the last chunk used by channel 0
printf("Mix_Chunk* last in use on channel 0 was: %08p\n", Mix_GetChunk(0));

See Also

Mix_Chunk, Mix_Playing

Mix_GetChunk (last edited 2008-04-17 08:18:26 by localhost)