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

Fix for #2714
This commit is contained in:
veins1 2022-10-02 22:30:26 +05:00 committed by GitHub
parent 33e7f7cc59
commit 2872b2fff5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");