Merge pull request #323 from danielpieczko/fix/mixer_init

Fix memory corruption during initialisation of mixer weights
This commit is contained in:
danielpieczko
2023-04-04 14:54:57 +01:00
committed by GitHub
2 changed files with 9 additions and 9 deletions

View File

@@ -1,6 +1,11 @@
lib_xua Change Log lib_xua Change Log
================== ==================
UNRELEASED
----------
* FIXED: Memory corruption during initialisation of mixer weights
3.4.0 3.4.0
----- -----

View File

@@ -275,15 +275,10 @@ void InitLocalMixerState()
} }
/* Configure default connections */ /* Configure default connections */
// TODO this should be a loop using defines. for (int i = 0; i < MAX_MIX_COUNT; i++)
mixer1Weights[0] = 0; {
mixer1Weights[9] = 0; mixer1Weights[(i * MAX_MIX_COUNT) + i] = 0;
mixer1Weights[18] = 0; }
mixer1Weights[27] = 0;
mixer1Weights[36] = 0;
mixer1Weights[45] = 0;
mixer1Weights[54] = 0;
mixer1Weights[63] = 0;
#if NUM_USB_CHAN_OUT > 0 #if NUM_USB_CHAN_OUT > 0
/* Setup up audio output channel mapping */ /* Setup up audio output channel mapping */