X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fdfsound%2Fspu.c;h=038f946eee2ec286700e2aff1ccf62e0bcdfa7d0;hb=73d2a9037e5ea290cac10a9f26860a6405b55a0c;hp=f5e8de503f88132aa421fadb0aacd17a38fe97ef;hpb=f28d12a72998b0a6018b41af8f86a24b10ab506f;p=pcsx_rearmed.git diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index f5e8de50..038f946e 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -814,6 +814,8 @@ static void do_channels(int ns_to) mix_chan(spu.SSumLR, ns_to, s_chan->iLeftVolume, s_chan->iRightVolume); } + MixXA(spu.SSumLR, RVB, ns_to, spu.decode_pos); + if (spu.rvb->StartAddr) { if (do_rvb) REVERBDo(spu.SSumLR, RVB, ns_to, spu.rvb->CurrAddr); @@ -829,7 +831,7 @@ static void do_samples_finish(int *SSumLR, int ns_to, // optional worker thread handling -#if HAVE_PTHREAD || defined(WANT_THREAD_CODE) +#if P_HAVE_PTHREAD || defined(WANT_THREAD_CODE) // worker thread state static struct spu_worker { @@ -1066,6 +1068,7 @@ static void sync_worker_thread(int force) work = &worker->i[worker->i_reaped & WORK_I_MASK]; thread_work_wait_sync(work, force); + MixXA(work->SSumLR, RVB, work->ns_to, work->decode_pos); do_samples_finish(work->SSumLR, work->ns_to, work->channels_silent, work->decode_pos); @@ -1084,7 +1087,7 @@ static void sync_worker_thread(int force) {} static const void * const worker = NULL; -#endif // HAVE_PTHREAD || defined(WANT_THREAD_CODE) +#endif // P_HAVE_PTHREAD || defined(WANT_THREAD_CODE) //////////////////////////////////////////////////////////////////////// // MAIN SPU FUNCTION @@ -1192,12 +1195,10 @@ static void do_samples_finish(int *SSumLR, int ns_to, spu.decode_dirty_ch &= ~(1<<3); } - MixXA(SSumLR, ns_to, decode_pos); - vol_l = vol_l * spu_config.iVolume >> 10; vol_r = vol_r * spu_config.iVolume >> 10; - if (!(spu.spuCtrl & 0x4000) || !(vol_l | vol_r)) + if (!(spu.spuCtrl & CTRL_MUTE) || !(vol_l | vol_r)) { // muted? (rare) memset(spu.pS, 0, ns_to * 2 * sizeof(spu.pS[0])); @@ -1365,7 +1366,7 @@ static void RemoveStreams(void) /* special code for TI C64x DSP */ #include "spu_c64x.c" -#elif HAVE_PTHREAD +#elif P_HAVE_PTHREAD #include #include @@ -1464,7 +1465,7 @@ static void exit_spu_thread(void) worker = NULL; } -#else // if !HAVE_PTHREAD +#else // if !P_HAVE_PTHREAD static void init_spu_thread(void) {