ref: dbff5fcaf60b32e21ee3750c4cc97a5021e57812
parent: f4f5a6a099540c9a8fea100e3c1aeab2e63d3245
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Wed Sep 7 07:20:06 EDT 2016
Prevent tonality estimator from running too often with 2.5 and 5 ms frames
--- a/src/analysis.c
+++ b/src/analysis.c
@@ -642,11 +642,11 @@
pcm_len = analysis_frame_size - analysis->analysis_offset;
offset = analysis->analysis_offset;
- do {
+ while (pcm_len>0) {
tonality_analysis(analysis, celt_mode, analysis_pcm, IMIN(480, pcm_len), offset, c1, c2, C, lsb_depth, downmix);
offset += 480;
pcm_len -= 480;
- } while (pcm_len>0);
+ }
analysis->analysis_offset = analysis_frame_size;
analysis->analysis_offset -= frame_size;