Update RingRayLib - raylib.c - Add Function : void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels)
@@ -6593,6 +6593,32 @@ RING_FUNC(ring_SetSoundPitch)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Sound"));
}
+
+RING_FUNC(ring_WaveFormat)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ return ;
+ }
+ if ( ! RING_API_ISPOINTER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(3) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(4) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ WaveFormat((Wave *) RING_API_GETCPOINTER(1,"Wave"), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3), (int ) RING_API_GETNUMBER(4));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -6967,4 +6993,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("issoundplaying",ring_IsSoundPlaying);
ring_vm_funcregister("setsoundvolume",ring_SetSoundVolume);
ring_vm_funcregister("setsoundpitch",ring_SetSoundPitch);
+ ring_vm_funcregister("waveformat",ring_WaveFormat);
}
