mixGetChunk function

Pointer<MixChunk> mixGetChunk(
  1. int channel
)

Get the Mix_Chunk currently associated with a mixer channel.

You may not specify MAX_CHANNEL_POST or -1 for a channel.

\param channel the channel to query. \returns the associated chunk, if any, or NULL if it's an invalid channel.

\since This function is available since SDL_mixer 2.0.0.

extern DECLSPEC Mix_Chunk * SDLCALL Mix_GetChunk(int channel)

Implementation

Pointer<MixChunk> mixGetChunk(int channel) {
  final mixGetChunkLookupFunction = libSdl2Mixer.lookupFunction<
      Pointer<MixChunk> Function(Int32 channel),
      Pointer<MixChunk> Function(int channel)>('Mix_GetChunk');
  return mixGetChunkLookupFunction(channel);
}