diff --git a/src/raudio.c b/src/raudio.c index 36820abe2..cc10f5185 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -1779,6 +1779,7 @@ void UpdateMusicStream(Music music) { StopMusicStream(music); // Stop music (and reset) if (music.looping) PlayMusicStream(music); // Play again + if (music.loopPoint != 0.0f) SeekMusicStream(music, music.loopPoint) // Skip to loop point } else { diff --git a/src/raudio.h b/src/raudio.h index 7e3c42f4e..43a5c52d3 100644 --- a/src/raudio.h +++ b/src/raudio.h @@ -108,6 +108,7 @@ typedef struct Sound { typedef struct Music { AudioStream stream; // Audio stream unsigned int frameCount; // Total number of frames (considering channels) + float loopPoint; // Position (in seconds) to return to after looping bool looping; // Music looping enable int ctxType; // Type of music context (audio filetype) diff --git a/src/raylib.h b/src/raylib.h index eeaf0c731..d2315cbbe 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -445,6 +445,7 @@ typedef struct Sound { typedef struct Music { AudioStream stream; // Audio stream unsigned int frameCount; // Total number of frames (considering channels) + float loopPoint; // Position (in seconds) to return to after looping bool looping; // Music looping enable int ctxType; // Type of music context (audio filetype)