mixSetMusicPosition function

bool mixSetMusicPosition(
  1. double position
)

Set the current position in the music stream, in seconds.

To convert from milliseconds, divide by 1000.0.

This function is only implemented for MOD music formats (set pattern order number) and for WAV, OGG, FLAC, MP3, and MODPLUG music at the moment.

\param position the new position, in seconds (as a double). \returns true on success or false on failure; call SDL_GetError() for more information.

\since This function is available since SDL_mixer 3.0.0.

extern SDL_DECLSPEC bool SDLCALL Mix_SetMusicPosition(double position)

Implementation

bool mixSetMusicPosition(double position) {
  final mixSetMusicPositionLookupFunction = libSdl3Mixer.lookupFunction<
      Uint8 Function(Double position),
      int Function(double position)>('Mix_SetMusicPosition');
  return mixSetMusicPositionLookupFunction(position) == 1;
}