From e5818632f00f83e183647dbbe010c6e6146893f4 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 21 Apr 2025 21:13:00 +0200 Subject: [PATCH] Synchronize UDP MIDI channels --- src/minidexed.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 5a78e41..1cca446 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -2432,6 +2432,10 @@ bool CMiniDexed::InitNetwork() if (!m_UDPMIDI) { LOGERR("CMiniDexed::InitNetwork: Failed to allocate UDP MIDI device"); // Clean up other network resources if needed, or handle error appropriately + } else { + // Synchronize UDP MIDI channels with current assignments + for (unsigned nTG = 0; nTG < m_nToneGenerators; ++nTG) + m_UDPMIDI->SetChannel(m_nMIDIChannel[nTG], nTG); } } LOGNOTE("CMiniDexed::InitNetwork: returning %d", m_pNet != nullptr);