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 (from parent 1:
b1ba085
)
spu: fix some fmod related breakage
author
notaz
<notasas@gmail.com>
Tue, 9 Dec 2014 02:11:36 +0000
(
04:11
+0200)
committer
notaz
<notasas@gmail.com>
Sat, 20 Dec 2014 00:57:25 +0000
(
02:57
+0200)
plugins/dfsound/spu.c
patch
|
blob
|
blame
|
history
diff --git
a/plugins/dfsound/spu.c
b/plugins/dfsound/spu.c
index
6cefd11
..
8f6ed13
100644
(file)
--- a/
plugins/dfsound/spu.c
+++ b/
plugins/dfsound/spu.c
@@
-692,7
+692,7
@@
static void noinline do_decode_bufs(int which, int start, int count)
static int do_samples(int forced_updates)
{
int volmult = iVolume;
static int do_samples(int forced_updates)
{
int volmult = iVolume;
- int ns,ns_from,ns_to;
+ int ns,ns_from,ns_to
,ns_len
;
int ch,d,silentch;
int bIRQReturn=0;
int ch,d,silentch;
int bIRQReturn=0;
@@
-740,21
+740,22
@@
static int do_samples(int forced_updates)
lastch=ch;
lastns=ns_to=d;
}
lastch=ch;
lastns=ns_to=d;
}
+ ns_len = ns_to - ns_from;
MixADSR(ch, ns_from, ns_to);
if(ch==1 || ch==3)
{
MixADSR(ch, ns_from, ns_to);
if(ch==1 || ch==3)
{
- do_decode_bufs(ch/2, ns_from, ns_
to-ns_from
);
+ do_decode_bufs(ch/2, ns_from, ns_
len
);
decode_dirty_ch |= 1<<ch;
}
if(s_chan[ch].bFMod==2) // fmod freq channel
decode_dirty_ch |= 1<<ch;
}
if(s_chan[ch].bFMod==2) // fmod freq channel
- memcpy(
iFMod, ChanBuf, sizeof(iFMod
));
-
else
if(s_chan[ch].bRVBActive)
- mix_chan_rvb(ns_from,
ns_to-ns_from,s_chan[ch].iLeftVolume,
s_chan[ch].iRightVolume);
+ memcpy(
&iFMod[ns_from], &ChanBuf[ns_from], ns_len * sizeof(iFMod[0]
));
+ if(s_chan[ch].bRVBActive)
+ mix_chan_rvb(ns_from,
ns_len, s_chan[ch].iLeftVolume,
s_chan[ch].iRightVolume);
else
else
- mix_chan(ns_from,
ns_to-ns_from,s_chan[ch].iLeftVolume,
s_chan[ch].iRightVolume);
+ mix_chan(ns_from,
ns_len, s_chan[ch].iLeftVolume,
s_chan[ch].iRightVolume);
}
}
}
}