Update RingRayLib - raylib.c - Add Function : void UnloadSound(Sound sound)
@@ -6457,6 +6457,18 @@ RING_FUNC(ring_UnloadWave)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Wave"));
}
+
+RING_FUNC(ring_UnloadSound)
+{
+ if ( RING_API_PARACOUNT != 1 ) {
+ RING_API_ERROR(RING_API_MISS1PARA);
+ return ;
+ }
+ UnloadSound(* (Sound *) RING_API_GETCPOINTER(1,"Sound"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Sound"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -6821,4 +6833,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("loadsoundfromwave",ring_LoadSoundFromWave);
ring_vm_funcregister("updatesound",ring_UpdateSound);
ring_vm_funcregister("unloadwave",ring_UnloadWave);
+ ring_vm_funcregister("unloadsound",ring_UnloadSound);
}
