notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed uname for Solaris + enabled Haiku build
[pcsx_rearmed.git]
/
plugins
/
dfsound
/
freeze.c
diff --git
a/plugins/dfsound/freeze.c
b/plugins/dfsound/freeze.c
index
83a7d52
..
43e6535
100644
(file)
--- a/
plugins/dfsound/freeze.c
+++ b/
plugins/dfsound/freeze.c
@@
-143,7
+143,7
@@
static void save_channel(SPUCHAN_orig *d, const SPUCHAN *s, int ch)
d->iSBPos = s->iSBPos;
\r
d->spos = s->spos;
\r
d->sinc = s->sinc;
\r
d->iSBPos = s->iSBPos;
\r
d->spos = s->spos;
\r
d->sinc = s->sinc;
\r
- memcpy(d->SB, s
->SB, sizeof(d->SB)
);
\r
+ memcpy(d->SB, s
pu.SB + ch * SB_SIZE, sizeof(d->SB[0]) * SB_SIZE
);
\r
d->iStart = (regAreaGet(ch,6)&~1)<<3;
\r
d->iCurr = 0; // set by the caller
\r
d->iLoop = 0; // set by the caller
\r
d->iStart = (regAreaGet(ch,6)&~1)<<3;
\r
d->iCurr = 0; // set by the caller
\r
d->iLoop = 0; // set by the caller
\r
@@
-157,8
+157,8
@@
static void save_channel(SPUCHAN_orig *d, const SPUCHAN *s, int ch)
d->bIgnoreLoop = (s->prevflags ^ 2) << 1;
\r
d->iRightVolume = s->iRightVolume;
\r
d->iRawPitch = s->iRawPitch;
\r
d->bIgnoreLoop = (s->prevflags ^ 2) << 1;
\r
d->iRightVolume = s->iRightVolume;
\r
d->iRawPitch = s->iRawPitch;
\r
- d->s_1 = s
->SB[
27]; // yes it's reversed
\r
- d->s_2 = s
->SB[
26];
\r
+ d->s_1 = s
pu.SB[ch * SB_SIZE +
27]; // yes it's reversed
\r
+ d->s_2 = s
pu.SB[ch * SB_SIZE +
26];
\r
d->bRVBActive = s->bRVBActive;
\r
d->bNoise = s->bNoise;
\r
d->bFMod = s->bFMod;
\r
d->bRVBActive = s->bRVBActive;
\r
d->bNoise = s->bNoise;
\r
d->bFMod = s->bFMod;
\r
@@
-185,7
+185,7
@@
static void load_channel(SPUCHAN *d, const SPUCHAN_orig *s, int ch)
d->spos = s->spos;
\r
d->sinc = s->sinc;
\r
d->sinc_inv = 0;
\r
d->spos = s->spos;
\r
d->sinc = s->sinc;
\r
d->sinc_inv = 0;
\r
- memcpy(
d->SB, s->SB, sizeof(d->SB)
);
\r
+ memcpy(
spu.SB + ch * SB_SIZE, s->SB, sizeof(spu.SB[0]) * SB_SIZE
);
\r
d->pCurr = (void *)((long)s->iCurr & 0x7fff0);
\r
d->pLoop = (void *)((long)s->iLoop & 0x7fff0);
\r
d->bReverb = s->bReverb;
\r
d->pCurr = (void *)((long)s->iCurr & 0x7fff0);
\r
d->pLoop = (void *)((long)s->iLoop & 0x7fff0);
\r
d->bReverb = s->bReverb;
\r
@@
-231,6
+231,8
@@
long CALLBACK SPUfreeze(uint32_t ulFreezeMode, SPUFreeze_t * pF,
\r
if(!pF) return 0; // first check
\r
\r
\r
if(!pF) return 0; // first check
\r
\r
+ do_samples(cycles, 1);
\r
+
\r
if(ulFreezeMode) // info or save?
\r
{//--------------------------------------------------//
\r
if(ulFreezeMode==1)
\r
if(ulFreezeMode) // info or save?
\r
{//--------------------------------------------------//
\r
if(ulFreezeMode==1)
\r
@@
-242,8
+244,6
@@
long CALLBACK SPUfreeze(uint32_t ulFreezeMode, SPUFreeze_t * pF,
\r
if(ulFreezeMode==2) return 1; // info mode? ok, bye
\r
// save mode:
\r
\r
if(ulFreezeMode==2) return 1; // info mode? ok, bye
\r
// save mode:
\r
- do_samples(cycles, 1);
\r
-
\r
memcpy(pF->cSPURam,spu.spuMem,0x80000); // copy common infos
\r
memcpy(pF->cSPUPort,spu.regArea,0x200);
\r
\r
memcpy(pF->cSPURam,spu.spuMem,0x80000); // copy common infos
\r
memcpy(pF->cSPUPort,spu.regArea,0x200);
\r
\r
@@
-279,6
+279,7
@@
long CALLBACK SPUfreeze(uint32_t ulFreezeMode, SPUFreeze_t * pF,
\r
memcpy(spu.spuMem,pF->cSPURam,0x80000); // get ram
\r
memcpy(spu.regArea,pF->cSPUPort,0x200);
\r
\r
memcpy(spu.spuMem,pF->cSPURam,0x80000); // get ram
\r
memcpy(spu.regArea,pF->cSPUPort,0x200);
\r
+ spu.bMemDirty = 1;
\r
\r
if(pF->xaS.nsamples<=4032) // start xa again
\r
SPUplayADPCMchannel(&pF->xaS);
\r
\r
if(pF->xaS.nsamples<=4032) // start xa again
\r
SPUplayADPCMchannel(&pF->xaS);
\r
@@
-302,7
+303,7
@@
long CALLBACK SPUfreeze(uint32_t ulFreezeMode, SPUFreeze_t * pF,
load_register(H_CDRight, cycles);
\r
\r
// fix to prevent new interpolations from crashing
\r
load_register(H_CDRight, cycles);
\r
\r
// fix to prevent new interpolations from crashing
\r
- for(i=0;i<MAXCHAN;i++) spu.
s_chan[i].SB[
28]=0;
\r
+ for(i=0;i<MAXCHAN;i++) spu.
SB[i * SB_SIZE +
28]=0;
\r
\r
ClearWorkingState();
\r
spu.cycles_played = cycles;
\r
\r
ClearWorkingState();
\r
spu.cycles_played = cycles;
\r