Browse Source

REVIEWED: CloseAudioBufferPool(), uninit buffers properly #1548

pull/1570/head
raysan5 3 years ago
parent
commit
edb54c6cb1
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/raudio.c

+ 3
- 1
src/raudio.c View File

@ -491,6 +491,8 @@ void CloseAudioDevice(void)
ma_context_uninit(&AUDIO.System.context);
CloseAudioBufferPool();
AUDIO.System.isReady = false;
TRACELOG(LOG_INFO, "AUDIO: Device closed successfully");
}
@ -1924,7 +1926,7 @@ static void InitAudioBufferPool(void)
// Close the audio buffers pool
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)

Loading…
Cancel
Save