Add loop functions for music files.

Tell xm tracker to loop tracker when loop state changes.
Don't let looped xm tracker streams restart, they are infinite
Use modulo to make time tracker for xm looped streams work correctly.
This commit is contained in:
Jeffery Myers 2021-03-21 16:42:12 -07:00
commit f8e5a87af5

View file

@ -1492,8 +1492,10 @@ RLAPI void ResumeMusicStream(Music music); // Resume
RLAPI bool IsMusicPlaying(Music music); // Check if music is playing
RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level)
RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level)
RLAPI void SetMusicLooping(Music *music, bool loop); // Set the music to loop or not
RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds)
RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
RLAPI bool GetMusicLooping(Music music); // Get the loop status of the music file
// AudioStream management functions
RLAPI AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Init audio stream (to stream raw audio pcm data)