Fix memory corruption during initialisation of mixer weights

This commit is contained in:
Daniel Pieczko
2023-04-04 14:28:55 +01:00
parent e8fcc80415
commit 4e7ddb4036
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 */