mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-09-27 04:37:00 -05:00
DSPHLE/Zelda: Add bounds check for m_sync_voice_skip_flags in RenderAudio()
This commit is contained in:
@@ -628,7 +628,11 @@ void ZeldaUCode::RenderAudio()
|
||||
if (m_rendering_curr_voice == 0)
|
||||
m_renderer.PrepareFrame();
|
||||
|
||||
while (m_rendering_curr_voice < m_rendering_voices_per_frame)
|
||||
// TODO: Find out the actual hardware behavior for the case where
|
||||
// (m_rendering_voices_per_frame >> 4) >= m_sync_voice_skip_flags.size()
|
||||
const u16 number_of_voices = std::min(m_rendering_voices_per_frame,
|
||||
static_cast<u16>(m_sync_voice_skip_flags.size() << 4));
|
||||
while (m_rendering_curr_voice < number_of_voices)
|
||||
{
|
||||
// If we are not meant to render this voice yet, go back to message
|
||||
// processing.
|
||||
|
||||
Reference in New Issue
Block a user