From 55b7c5adc9c662920618d76ec7ff3595d0a6fa1f Mon Sep 17 00:00:00 2001 From: Christian Haas Date: Tue, 9 Apr 2024 08:12:58 +0200 Subject: [PATCH] Flip release of buffer; First it needs to be taken out of the processing chain, then it can be released. The inverse of the initialization. --- src/raudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raudio.c b/src/raudio.c index 0e9e043d1..b87d31f40 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -612,8 +612,8 @@ void UnloadAudioBuffer(AudioBuffer *buffer) { if (buffer != NULL) { - ma_data_converter_uninit(&buffer->converter, NULL); UntrackAudioBuffer(buffer); + ma_data_converter_uninit(&buffer->converter, NULL); RL_FREE(buffer->data); RL_FREE(buffer); }