From 257f232d418cd0e8dc6aef409a16defca044fa1a Mon Sep 17 00:00:00 2001 From: raysan5 Date: Thu, 14 May 2020 14:00:37 +0200 Subject: WARNING: BREAKING CHANGE: Review audio looping system Current looping system was broken, `loopCount` has been converted to `bool looping` and user can enable/disable with `music.looping = false`. `SetMusicLoopCount()` has been removed. --- src/raudio.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/raudio.h') diff --git a/src/raudio.h b/src/raudio.h index 154ae8e5..8056a37e 100644 --- a/src/raudio.h +++ b/src/raudio.h @@ -111,8 +111,8 @@ typedef struct Music { int ctxType; // Type of music context (audio filetype) void *ctxData; // Audio context data, depends on type + bool looping; // Music looping enable unsigned int sampleCount; // Total number of samples - unsigned int loopCount; // Loops count (times music will play), 0 means infinite loop AudioStream stream; // Audio stream } Music; @@ -173,7 +173,6 @@ void ResumeMusicStream(Music music); // Resume playin bool IsMusicPlaying(Music music); // Check if music is playing void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level) void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level) -void SetMusicLoopCount(Music music, int count); // Set music loop count (loop repeats) float GetMusicTimeLength(Music music); // Get music time length (in seconds) float GetMusicTimePlayed(Music music); // Get current music time played (in seconds) -- cgit v1.2.3