Update RingRayLib - raylib.c - Add Function : float GetMusicTimeLength(Music music)
@@ -6821,6 +6821,18 @@ RING_FUNC(ring_SetMusicLoopCount)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Music"));
}
+
+RING_FUNC(ring_GetMusicTimeLength)
+{
+ if ( RING_API_PARACOUNT != 1 ) {
+ RING_API_ERROR(RING_API_MISS1PARA);
+ return ;
+ }
+ RING_API_RETNUMBER(GetMusicTimeLength(* (Music *) RING_API_GETCPOINTER(1,"Music")));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Music"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -7210,4 +7222,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("setmusicvolume",ring_SetMusicVolume);
ring_vm_funcregister("setmusicpitch",ring_SetMusicPitch);
ring_vm_funcregister("setmusicloopcount",ring_SetMusicLoopCount);
+ ring_vm_funcregister("getmusictimelength",ring_GetMusicTimeLength);
}
