comparison src/cs/services/etm/etm_audio.c @ 702:9394305d4ff5 default tip

etm_audio.c: fix off-by-one error in auw of FIR coefficients This fix was already made in FC Tourmaline a while back, but it is also the kind of bugfix that deserves to be backported to Magnetite and Selenite as well.
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 31 Oct 2022 00:14:44 +0000
parents 945cf7f506b2
children
comparison
equal deleted inserted replaced
701:35e7f9d0379f 702:9394305d4ff5
222 tr_etm(TgTrAudio, "ETM AUDIO: _audio_write: AUDIO_MICROPHONE/SPEAKER_FIR [%d]", 222 tr_etm(TgTrAudio, "ETM AUDIO: _audio_write: AUDIO_MICROPHONE/SPEAKER_FIR [%d]",
223 sizeof(T_AUDIO_FIR_COEF)/2); // RemoveMe 223 sizeof(T_AUDIO_FIR_COEF)/2); // RemoveMe
224 224
225 parameter = etm_malloc (sizeof(T_AUDIO_FIR_COEF)); 225 parameter = etm_malloc (sizeof(T_AUDIO_FIR_COEF));
226 // Write coeffient values 226 // Write coeffient values
227 for (i=0; i <= (sizeof(T_AUDIO_FIR_COEF)/2); i++) { 227 for (i=0; i < (sizeof(T_AUDIO_FIR_COEF)/2); i++) {
228 ((T_AUDIO_FIR_COEF *) parameter)->coefficient[i] = etm_get16(buf); buf += 2; 228 ((T_AUDIO_FIR_COEF *) parameter)->coefficient[i] = etm_get16(buf); buf += 2;
229 } 229 }
230 audio.data = parameter; 230 audio.data = parameter;
231 break; 231 break;
232 } 232 }