Commit a325c83b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

audiobargraph: stick to single precision

parent 0ef6a5e1
...@@ -196,7 +196,7 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf ) ...@@ -196,7 +196,7 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
max = ch; max = ch;
} }
} }
max = pow( max, 2 ); max = powf( max, 2 );
if (p_sys->silence) { if (p_sys->silence) {
/* 2 - store the new value */ /* 2 - store the new value */
...@@ -231,8 +231,8 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf ) ...@@ -231,8 +231,8 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
count ++; count ++;
current = current->next; current = current->next;
} }
sum = sum / count; sum /= count;
sum = sqrt(sum); sum = sqrtf(sum);
/* 5 - compare it to the threshold */ /* 5 - compare it to the threshold */
if (sum < p_sys->alarm_threshold) { if (sum < p_sys->alarm_threshold) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment