diff --git a/client/audiodevs/PipeWire/pipewire.c b/client/audiodevs/PipeWire/pipewire.c index 749b85e3..06dae0d1 100644 --- a/client/audiodevs/PipeWire/pipewire.c +++ b/client/audiodevs/PipeWire/pipewire.c @@ -197,6 +197,7 @@ static void pipewire_playbackStopStream(void) pw_stream_destroy(pw.playback.stream); pw.playback.stream = NULL; pw.playback.rateMatch = NULL; + ringbuffer_free(&pw.playback.buffer); pw_thread_loop_unlock(pw.thread); } diff --git a/client/src/audio.c b/client/src/audio.c index 04e3ea0d..2a66c85a 100644 --- a/client/src/audio.c +++ b/client/src/audio.c @@ -72,6 +72,9 @@ void audio_free(void) if (!audio.audioDev) return; + audio_playbackStop(); + audio_recordStop(); + audio.audioDev->free(); audio.audioDev = NULL; }