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 )
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) {
......
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