commit c6a873c8032c04ae3ee45971ec04c1b2f95b9909
parent 15755f03bc332388c9ecfd77c88ec8a69dcb43c3
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Sun, 2 Feb 2025 12:49:18 +0100
move early out out of costly function to prevent stack frame
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/source/nord/n2x/n2xLib/n2xhardware.cpp b/source/nord/n2x/n2xLib/n2xhardware.cpp
@@ -84,7 +84,8 @@ namespace n2x
void Hardware::processUC()
{
- syncUCtoDSP();
+ if(m_remainingUcCycles <= 0)
+ syncUCtoDSP();
const auto deltaCycles = m_uc.exec();
@@ -257,8 +258,7 @@ namespace n2x
void Hardware::syncUCtoDSP()
{
- if(m_remainingUcCycles > 0)
- return;
+ assert(m_remainingUcCycles <= 0);
// we can only use ESAI to clock the uc once it has been enabled
if(m_esaiFrameIndex <= 0)