commit 673060c65dd115f993d7a4774fc43fd39591687f parent 9cdfb470aad3a848e4b575f13e4d390235424c81 Author: dsp56300 <dsp56300@users.noreply.github.com> Date: Sun, 21 Jul 2024 03:10:38 +0200 ensure that UC always has enough hdi rx data Diffstat:
M | source/nord/n2x/n2xLib/n2xdsp.cpp | | | 10 | +++++++++- |
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/source/nord/n2x/n2xLib/n2xdsp.cpp b/source/nord/n2x/n2xLib/n2xdsp.cpp @@ -150,7 +150,15 @@ namespace n2x void DSP::onUCRxEmpty(bool _needMoreData) { - hdiTransferDSPtoUC(); + if(_needMoreData) + { + m_hardware.ucYieldLoop([&] + { + return dsp().hasPendingInterrupts(); + }); + } + const bool res = hdiTransferDSPtoUC(); + assert(!_needMoreData || res); } void DSP::hdiTransferUCtoDSP(const uint32_t _word)