mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
ZeldaHLE: Properly read remaining AFC samples when a whole frame is available.
This commit is contained in:
parent
a602466e4f
commit
fcbed7483d
@ -1544,8 +1544,9 @@ void ZeldaAudioRenderer::DownloadAFCSamplesFromARAM(
|
||||
// Try to push currently cached/already decoded samples.
|
||||
u16 remaining_to_output = std::min(vpb->afc_remaining_decoded_samples,
|
||||
requested_samples_count);
|
||||
for (size_t i = 0x10 - remaining_to_output; i < 0x10; ++i)
|
||||
*dst++ = vpb->afc_remaining_samples[i];
|
||||
s16* base = &vpb->afc_remaining_samples[0x10 - vpb->afc_remaining_decoded_samples];
|
||||
for (size_t i = 0; i < remaining_to_output; ++i)
|
||||
*dst++ = base[i];
|
||||
|
||||
vpb->afc_remaining_decoded_samples -= remaining_to_output;
|
||||
requested_samples_count -= remaining_to_output;
|
||||
|
Loading…
Reference in New Issue
Block a user