mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-07 11:58:13 +00:00
REVIEWED: CloseAudioBufferPool(), uninit buffers properly #1548
This commit is contained in:
@@ -492,6 +492,8 @@ void CloseAudioDevice(void)
|
|||||||
|
|
||||||
CloseAudioBufferPool();
|
CloseAudioBufferPool();
|
||||||
|
|
||||||
|
AUDIO.System.isReady = false;
|
||||||
|
|
||||||
TRACELOG(LOG_INFO, "AUDIO: Device closed successfully");
|
TRACELOG(LOG_INFO, "AUDIO: Device closed successfully");
|
||||||
}
|
}
|
||||||
else TRACELOG(LOG_WARNING, "AUDIO: Device could not be closed, not currently initialized");
|
else TRACELOG(LOG_WARNING, "AUDIO: Device could not be closed, not currently initialized");
|
||||||
@@ -1924,7 +1926,7 @@ static void InitAudioBufferPool(void)
|
|||||||
// Close the audio buffers pool
|
// Close the audio buffers pool
|
||||||
static void CloseAudioBufferPool(void)
|
static void CloseAudioBufferPool(void)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_AUDIO_BUFFER_POOL_CHANNELS; i++) RL_FREE(AUDIO.MultiChannel.pool[i]);
|
for (int i = 0; i < MAX_AUDIO_BUFFER_POOL_CHANNELS; i++) UnloadAudioBuffer(AUDIO.MultiChannel.pool[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SUPPORT_FILEFORMAT_WAV)
|
#if defined(SUPPORT_FILEFORMAT_WAV)
|
||||||
|
Reference in New Issue
Block a user