From ee98433b9ec9eb891cb285ff4818dc169d55ce87 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 24 Mar 2024 02:47:33 +0200 Subject: [PATCH] spu: don't assert on noise in thread mode --- plugins/dfsound/spu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index ad86cabc..9d43e438 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -1000,8 +1000,10 @@ static void queue_channel_work(int ns_to, unsigned int silentch) if (unlikely(s_chan->bFMod == 2)) { // sucks, have to do double work - assert(!s_chan->bNoise); - d = do_samples_gauss(tmpFMod, decode_block, NULL, ch, ns_to, + if (s_chan->bNoise) + d = do_samples_noise(tmpFMod, ch, ns_to); + else + d = do_samples_gauss(tmpFMod, decode_block, NULL, ch, ns_to, &spu.sb[ch], s_chan->sinc, &s_chan->spos, &s_chan->iSBPos); if (!s_chan->bStarting) { d = MixADSR(tmpFMod, &s_chan->ADSRX, d); -- 2.39.2