From 772a0378bb2ad9285d8a4705193e34cdca32e3aa Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Mon, 20 Nov 2023 17:59:26 -0800 Subject: [PATCH] avoid calling Thread.Join from finalizer --- src/Audio/AudioDevice.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Audio/AudioDevice.cs b/src/Audio/AudioDevice.cs index 3503676..30763a8 100644 --- a/src/Audio/AudioDevice.cs +++ b/src/Audio/AudioDevice.cs @@ -278,10 +278,11 @@ namespace MoonWorks.Audio if (!IsDisposed) { Running = false; - Thread.Join(); if (disposing) { + Thread.Join(); + // stop all source voices foreach (var resource in resources) {