Update RingRayLib - raylib.c - Add Function : AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels)
@@ -6845,6 +6845,33 @@ RING_FUNC(ring_GetMusicTimePlayed)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Music"));
}
+
+RING_FUNC(ring_InitAudioStream)
+{
+ if ( RING_API_PARACOUNT != 3 ) {
+ RING_API_ERROR(RING_API_MISS3PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(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 ;
+ }
+ {
+ AudioStream *pValue ;
+ pValue = (AudioStream *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(AudioStream)) ;
+ *pValue = InitAudioStream( (unsigned int ) RING_API_GETNUMBER(1), (unsigned int ) RING_API_GETNUMBER(2), (unsigned int ) RING_API_GETNUMBER(3));
+ RING_API_RETMANAGEDCPOINTER(pValue,"AudioStream",ring_state_free);
+ }
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -7236,4 +7263,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("setmusicloopcount",ring_SetMusicLoopCount);
ring_vm_funcregister("getmusictimelength",ring_GetMusicTimeLength);
ring_vm_funcregister("getmusictimeplayed",ring_GetMusicTimePlayed);
+ ring_vm_funcregister("initaudiostream",ring_InitAudioStream);
}
