notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ca1e56
)
spu: add a guard for "runaway" channels
author
notaz
<notasas@gmail.com>
Tue, 21 Nov 2023 23:06:05 +0000
(
01:06
+0200)
committer
notaz
<notasas@gmail.com>
Tue, 21 Nov 2023 23:06:05 +0000
(
01:06
+0200)
should really mask but it's inconvenient with the raw pointers used
there
plugins/dfsound/spu.c
patch
|
blob
|
blame
|
history
diff --git
a/plugins/dfsound/spu.c
b/plugins/dfsound/spu.c
index
1cc1cbf
..
6671e3e
100644
(file)
--- a/
plugins/dfsound/spu.c
+++ b/
plugins/dfsound/spu.c
@@
-1551,7
+1551,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)