Explorar o código

Clear PCM buffer state when closing audio device (#2736)

Fix for #2714
veins1 %!s(int64=2) %!d(string=hai) anos
pai
achega
2872b2fff5
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/raudio.c

+ 3 - 1
src/raudio.c

@@ -509,7 +509,9 @@ void CloseAudioDevice(void)
 
         AUDIO.System.isReady = false;
         RL_FREE(AUDIO.System.pcmBuffer);
-
+        AUDIO.System.pcmBuffer = NULL;
+        AUDIO.System.pcmBufferSize = 0;
+        
         TRACELOG(LOG_INFO, "AUDIO: Device closed successfully");
     }
     else TRACELOG(LOG_WARNING, "AUDIO: Device could not be closed, not currently initialized");