setPosition method

bool setPosition(
  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 setPosition(double position) {
  return mixSetMusicPosition(position);
}