forked from Mirrors/freeswitch
FS-11785 [libteletone] Fix unlikely divide by zero in teletone_mux_tones
This commit is contained in:
parent
96c8cb0473
commit
7187e8ecd2
@ -256,7 +256,9 @@ TELETONE_API(int) teletone_mux_tones(teletone_generation_session_t *ts, teletone
|
||||
int32_t s = teletone_dds_state_modulate_sample(&tones[i], 0);
|
||||
sample += s;
|
||||
}
|
||||
sample /= freqlen;
|
||||
if (freqlen) {
|
||||
sample /= freqlen;
|
||||
}
|
||||
ts->buffer[ts->samples] = (teletone_audio_t)sample;
|
||||
|
||||
for (c = 1; c < ts->channels; c++) {
|
||||
|
Loading…
Reference in New Issue
Block a user