FreeCalypso > hg > fc-selenite
comparison src/cs/services/etm/etm_audio.c @ 211:4035c19073aa
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:18:16 +0000 |
parents | b6a5e36de839 |
children |
comparison
equal
deleted
inserted
replaced
210:b81101e50fc6 | 211:4035c19073aa |
---|---|
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 } |