Tao.Sdl SDK Documentation

SdlMixer.Mix_GetChunk Method 

Get the sample playing on a channel

[Visual Basic]
Public Shared Function Mix_GetChunk( _
   ByVal channel As Integer _
) As IntPtr
[C#]
public static IntPtr Mix_GetChunk(
   int channel
);

Parameters

channel
Channel to get the current Mix_Chunk playing. -1 is not valid, but will not crash the program.

Return Value

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

Remarks

Get the most recent sample chunk pointer played on channel. This pointer may be currently playing, or just the last used. Note: The actual chunk may have been freed, so this pointer may not be valid anymore.

Binds to C-function in SDL_mixer.h

Mix_Chunk *Mix_GetChunk(int channel)
            

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

SdlMixer Class | Tao.Sdl Namespace | SdlMixer.Mix_Chunk | Mix_Playing