]> git.sesse.net Git - vlc/commitdiff
audiobargraph: stick to single precision
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 20 Mar 2014 20:36:17 +0000 (22:36 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 20 Mar 2014 21:10:58 +0000 (23:10 +0200)
modules/audio_filter/audiobargraph_a.c

index b29d60fc639eca6e0303f2ff69dee5cb0fa9dca3..23115f1dcfd34ff8ca2149f227d70a4171078c3c 100644 (file)
@@ -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) {