File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,15 @@ void Mixer::param_change_callback(uint16_t param_id)
5959
6060 if ((param_id >=PARAM_PRIMARY_MIXER_OUTPUT_0 )&&(param_id <=PARAM_PRIMARY_MIXER_5_9 )) {
6161 load_primary_mixer_values ();
62+
63+ // Check to see if the secondary mixer needs to be updated.
64+ // Without a call to init_mixing, the primary and secondary mixer parameters can get out of sync, if
65+ // the PARAM_SECONDARY_MIXER is set to an invalid mixer (and thus is defaulting to primary mixer).
66+ mixer_type_t mixer_choice = static_cast <mixer_type_t >(RF_.params_ .get_param_int (PARAM_SECONDARY_MIXER));
67+ if (mixer_choice >= NUM_MIXERS) {
68+ secondary_mixer_ = primary_mixer_;
69+ save_secondary_mixer_params ();
70+ }
6271 } else if ((param_id >=PARAM_SECONDARY_MIXER_0_0 )&&(param_id <=PARAM_SECONDARY_MIXER_5_9 )) {
6372 load_secondary_mixer_values ();
6473 } else switch (param_id) {
You can’t perform that action at this time.
0 commit comments