From 0ad5d4a1638695c19f111a682423230646c7e9f7 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 22 Jan 2022 22:20:42 +0200 Subject: [PATCH] spu: save/restore decode_pos SPUOSSFreeze_t conveniently had padding space for it --- plugins/dfsound/freeze.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/dfsound/freeze.c b/plugins/dfsound/freeze.c index 43e6535c..3bdbab1b 100644 --- a/plugins/dfsound/freeze.c +++ b/plugins/dfsound/freeze.c @@ -119,6 +119,7 @@ typedef struct typedef struct { unsigned short spuIrq; + unsigned short decode_pos; uint32_t pSpuIrq; uint32_t spuAddr; uint32_t dummy1; @@ -261,6 +262,7 @@ long CALLBACK SPUfreeze(uint32_t ulFreezeMode, SPUFreeze_t * pF, pFO->spuAddr=spu.spuAddr; if(pFO->spuAddr==0) pFO->spuAddr=0xbaadf00d; + pFO->decode_pos = spu.decode_pos; for(i=0;ispuAddr == 0xbaadf00d) spu.spuAddr = 0; else spu.spuAddr = pFO->spuAddr & 0x7fffe; } + spu.decode_pos = pFO->decode_pos & 0x1ff; spu.dwNewChannel=0; spu.dwChannelOn=0; -- 2.39.5