if(Mix_MusicLength()-Mix_MusicPosition()<=3) Mix_SetMusicPosition(0);To say that if the music position is three seconds from the end, skip to the beginning. I would edit my audio files, but the program I am exporting music compositions from adds a precise number of seconds to the end of each file. Instead of having to remove this and try with trial and error to get the looping set up properly again each time, I would like to just edit my music playing system in my project to ignore the last three (or whatever number I specify) seconds of the music.
If there is a better way to do this, please share. Thank you!