notaz.gp2x.de
/
picodrive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7eeb85b
)
mcd, fix pcm looping (1st sample lost)
author
kub
<derkub@gmail.com>
Sun, 31 Oct 2021 21:47:49 +0000
(22:47 +0100)
committer
kub
<derkub@gmail.com>
Sun, 31 Oct 2021 21:47:49 +0000
(22:47 +0100)
pico/cd/pcm.c
patch
|
blob
|
blame
|
history
diff --git
a/pico/cd/pcm.c
b/pico/cd/pcm.c
index
795ec3b
..
9d84ee8
100644
(file)
--- a/
pico/cd/pcm.c
+++ b/
pico/cd/pcm.c
@@
-92,7
+92,7
@@
void pcd_pcm_sync(unsigned int to)
mul_l = (int)ch->regs[0] * (ch->regs[1] & 0xf);
mul_r = (int)ch->regs[0] * (ch->regs[1] >> 4);
- for (s = 0; s < steps; s++
, addr = (addr + inc) & 0x07FFFFFF
)
+ for (s = 0; s < steps; s++)
{
smp = Pico_mcd->pcm_ram[addr >> PCM_STEP_SHIFT];
@@
-104,7
+104,8
@@
void pcd_pcm_sync(unsigned int to)
addr <<= PCM_STEP_SHIFT;
if (smp == 0xff)
break;
- }
+ } else
+ addr = (addr + inc) & 0x07FFFFFF;
if (smp & 0x80)
smp = -(smp & 0x7f);