From d8f66523b6d0cbae18fa2d61db577b2effa5fd43 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 8 Mar 2025 04:37:42 -0500 Subject: [PATCH] NDS: prepare for optimization --- src/engine/platform/sound/nds.cpp | 14 ++++++++++++++ src/engine/platform/sound/nds.hpp | 2 ++ 2 files changed, 16 insertions(+) diff --git a/src/engine/platform/sound/nds.cpp b/src/engine/platform/sound/nds.cpp index e0b138878..fa45048a0 100644 --- a/src/engine/platform/sound/nds.cpp +++ b/src/engine/platform/sound/nds.cpp @@ -54,6 +54,15 @@ namespace nds_sound_emu m_routput = 0; } + s32 nds_sound_t::predict() { + s32 ret=INT32_MAX; + for (u8 i = 0; i < 16; i++) { + const s32 next=m_channel[i].predict(); + if (next