From 13b721b4db38b310bc644ce2922687fda1433ab1 Mon Sep 17 00:00:00 2001 From: Uneven Prankster Date: Tue, 18 Jul 2023 16:19:39 -0300 Subject: Attempt at loop point addition. --- raylib/raudio.c | 1 + raylib/raylib.h | 1 + 2 files changed, 2 insertions(+) (limited to 'raylib') diff --git a/raylib/raudio.c b/raylib/raudio.c index 5e2ccf9..d0f6963 100644 --- a/raylib/raudio.c +++ b/raylib/raudio.c @@ -1909,6 +1909,7 @@ void UpdateMusicStream(Music music) StopMusicStream(music); return; } + if (music.loopPoint != 0.0f) SeekMusicStream(music, music.loopPoint); } } diff --git a/raylib/raylib.h b/raylib/raylib.h index f9f3662..58b5c7c 100644 --- a/raylib/raylib.h +++ b/raylib/raylib.h @@ -467,6 +467,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) -- cgit v1.2.3