mixGetNumTracks function

int mixGetNumTracks(
  1. Pointer<MixMusic> music
)

Get number of tracks in music object.

This only applies to GME music formats.

\param music the music object. \returns number of tracks if successful, or -1 if failed or isn't implemented.

\since This function is available since SDL_mixer 3.0.0.

extern SDL_DECLSPEC int SDLCALL Mix_GetNumTracks(Mix_Music *music)

Implementation

int mixGetNumTracks(Pointer<MixMusic> music) {
  final mixGetNumTracksLookupFunction = libSdl3Mixer.lookupFunction<
      Int32 Function(Pointer<MixMusic> music),
      int Function(Pointer<MixMusic> music)>('Mix_GetNumTracks');
  return mixGetNumTracksLookupFunction(music);
}