Skip to content

Commit 2872b2f

Browse files
authored
Clear PCM buffer state when closing audio device (#2736)
Fix for #2714
1 parent 33e7f7c commit 2872b2f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/raudio.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,9 @@ void CloseAudioDevice(void)
509509

510510
AUDIO.System.isReady = false;
511511
RL_FREE(AUDIO.System.pcmBuffer);
512-
512+
AUDIO.System.pcmBuffer = NULL;
513+
AUDIO.System.pcmBufferSize = 0;
514+
513515
TRACELOG(LOG_INFO, "AUDIO: Device closed successfully");
514516
}
515517
else TRACELOG(LOG_WARNING, "AUDIO: Device could not be closed, not currently initialized");

0 commit comments

Comments
 (0)