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.
This commit is contained in:
Christian Haas 2024-04-09 08:45:33 +02:00
parent 95e77eaaa5
commit 0ff911c0df

View File

@ -1037,8 +1037,8 @@ void UnloadSoundAlias(Sound alias)
// Untrack and unload just the sound buffer, not the sample data, it is shared with the source for the alias // Untrack and unload just the sound buffer, not the sample data, it is shared with the source for the alias
if (alias.stream.buffer != NULL) if (alias.stream.buffer != NULL)
{ {
ma_data_converter_uninit(&alias.stream.buffer->converter, NULL);
UntrackAudioBuffer(alias.stream.buffer); UntrackAudioBuffer(alias.stream.buffer);
ma_data_converter_uninit(&alias.stream.buffer->converter, NULL);
RL_FREE(alias.stream.buffer); RL_FREE(alias.stream.buffer);
} }
} }