mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
DSPHLE/Zelda: fix Pikmin 2 save sound (issue 8855)
This commit is contained in:
parent
493a42d792
commit
b932691810
@ -1407,12 +1407,13 @@ void ZeldaAudioRenderer::LoadInputSamples(MixingBuffer* buffer, VPB* vpb)
|
||||
else
|
||||
shift = 2;
|
||||
u32 mask = (1 << shift) - 1;
|
||||
u32 ratio = vpb->resampling_ratio << (shift - 1);
|
||||
|
||||
u32 pos = vpb->current_pos_frac << shift;
|
||||
for (s16& sample : *buffer)
|
||||
{
|
||||
sample = ((pos >> 16) & mask) ? 0xC000 : 0x4000;
|
||||
pos += vpb->resampling_ratio;
|
||||
pos += ratio;
|
||||
}
|
||||
vpb->current_pos_frac = (pos >> shift) & 0xFFFF;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user