X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=plugins%2Fdfsound%2Fspu.c;h=0e4b154e66b331d53b7753e5c78c2255ff732f1d;hb=42dde520a83b9c391b41b0eceecb1ce3eaed7e72;hp=1cc1cbf94e21bf7ff6da01ecb710c164677bbef3;hpb=38b8a211aad8d2c485ccf0c0cbb58d965aac3483;p=pcsx_rearmed.git diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index 1cc1cbf9..0e4b154e 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -1490,6 +1490,8 @@ static void init_spu_thread(void) { int ret; + spu.sb_thread = spu.sb_thread_; + if (sysconf(_SC_NPROCESSORS_ONLN) <= 1) return; @@ -1551,7 +1553,10 @@ long CALLBACK SPUinit(void) int i; memset(&spu, 0, sizeof(spu)); - spu.spuMemC = calloc(1, 512 * 1024); + spu.spuMemC = calloc(1, 512 * 1024 + 16); + // a guard for runaway channels - End+Mute + spu.spuMemC[512 * 1024 + 1] = 1; + InitADSR(); spu.s_chan = calloc(MAXCHAN+1, sizeof(spu.s_chan[0])); // channel + 1 infos (1 is security for fmod handling)