[vlc-commits] audiobargraph: stick to single precision

Rémi Denis-Courmont git at videolan.org
Thu Mar 20 22:11:03 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Mar 20 22:36:17 2014 +0200| [a325c83b1387d4844eb211cd0b142166570a2ea0] | committer: Rémi Denis-Courmont

audiobargraph: stick to single precision

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

 modules/audio_filter/audiobargraph_a.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/audio_filter/audiobargraph_a.c b/modules/audio_filter/audiobargraph_a.c
index b29d60f..23115f1 100644
--- a/modules/audio_filter/audiobargraph_a.c
+++ b/modules/audio_filter/audiobargraph_a.c
@@ -196,7 +196,7 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
                 max = ch;
         }
     }
-    max = pow( max, 2 );
+    max = powf( max, 2 );
 
     if (p_sys->silence) {
         /* 2 - store the new value */
@@ -231,8 +231,8 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
                 count ++;
                 current = current->next;
             }
-            sum = sum / count;
-            sum = sqrt(sum);
+            sum /= count;
+            sum = sqrtf(sum);
 
             /* 5 - compare it to the threshold */
             if (sum < p_sys->alarm_threshold) {



More information about the vlc-commits mailing list