From 0d36993cebe53bf6a994e9831525193460411624 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 2 May 2018 21:02:45 +0200 Subject: [PATCH] Remove name when sound is done --- audio/audio_driver.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/audio/audio_driver.c b/audio/audio_driver.c index ae0d5c8bcc..38efa39051 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -1058,6 +1058,10 @@ static void audio_mixer_play_stop_cb( { unsigned i = (unsigned)idx; + if (!string_is_empty(audio_mixer_streams[i].name)) + free(audio_mixer_streams[i].name); + + audio_mixer_streams[i].name = NULL; audio_mixer_streams[i].state = AUDIO_STREAM_STATE_NONE; audio_mixer_streams[i].volume = 0.0f; audio_mixer_streams[i].buf = NULL;