Update RingRayLib - raylib.c - Add Function : Sound LoadSound(const char *fileName)
@@ -6389,6 +6389,25 @@ RING_FUNC(ring_LoadWaveEx)
}
}
+
+RING_FUNC(ring_LoadSound)
+{
+ if ( RING_API_PARACOUNT != 1 ) {
+ RING_API_ERROR(RING_API_MISS1PARA);
+ return ;
+ }
+ if ( ! RING_API_ISSTRING(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ {
+ Sound *pValue ;
+ pValue = (Sound *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(Sound)) ;
+ *pValue = LoadSound(RING_API_GETSTRING(1));
+ RING_API_RETMANAGEDCPOINTER(pValue,"Sound",ring_state_free);
+ }
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -6749,4 +6768,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("setmastervolume",ring_SetMasterVolume);
ring_vm_funcregister("loadwave",ring_LoadWave);
ring_vm_funcregister("loadwaveex",ring_LoadWaveEx);
+ ring_vm_funcregister("loadsound",ring_LoadSound);
}
