[vlc-commits] equalizer: increase precision of frequency centers in debug output

Ronald Wright git at videolan.org
Thu Mar 21 19:03:35 CET 2013


vlc | branch: master | Ronald Wright <logiconcepts819 at gmail.com> | Wed Mar 20 18:10:01 2013 -0500| [a2f4514ca199dc3406d9230c9ccfd08cce2779b6] | committer: Rémi Denis-Courmont

equalizer: increase precision of frequency centers in debug output

Currently, one of the debug lines in the equalizer module prints out center
frequency values truncated (not rounded) to zero decimal places, and when VLC
is set to use ISO center frequencies, this causes some level of disagreement
between the depiction of the truncated frequencies in the module debug output
and the depiction of the rounded frequencies in the Qt GUI labels.  The 62.5 Hz
ISO center frequency is one of these frequencies, where we have 62 Hz shown in
the debug output and 63 Hz shown in the Qt GUI.  This patch fixes the issue by
displaying the center frequencies in the debug output as real values rounded to
the nearest hundredth.

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a2f4514ca199dc3406d9230c9ccfd08cce2779b6
---

 modules/audio_filter/equalizer.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/audio_filter/equalizer.c b/modules/audio_filter/equalizer.c
index 44a3b25..7e75583 100644
--- a/modules/audio_filter/equalizer.c
+++ b/modules/audio_filter/equalizer.c
@@ -402,8 +402,8 @@ static int EqzInit( filter_t *p_filter, int i_rate )
                         i_rate, p_sys->i_band, p_sys->b_2eqz ? 2 : 1 );
     for( i = 0; i < p_sys->i_band; i++ )
     {
-        msg_Dbg( p_filter, "   %d Hz -> factor:%f alpha:%f beta:%f gamma:%f",
-                 (int)cfg.band[i].f_frequency, p_sys->f_amp[i],
+        msg_Dbg( p_filter, "   %.2f Hz -> factor:%f alpha:%f beta:%f gamma:%f",
+                 cfg.band[i].f_frequency, p_sys->f_amp[i],
                  p_sys->f_alpha[i], p_sys->f_beta[i], p_sys->f_gamma[i]);
     }
     return VLC_SUCCESS;



More information about the vlc-commits mailing list