Mix_GetChunk -- Get the chunk associated with a channel.
#include "SDL_mixer.h" Mix_Chunk *Mix_GetChunk(int channel)
Mix_GetChunk gets the most recent sample chunk pointer played on channel. This pointer may be currently playing, or just the last used.
- Channel to get the current Mix_Chunk playing.
- -1 is not valid, but will not crash the program.
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.
// get the last chunk used by channel 0 printf("Mix_Chunk* last in use on channel 0 was: %08p\n", Mix_GetChunk(0));