Commit 5b2e6161 authored by Rafaël Carré's avatar Rafaël Carré

audiobargraph_a: simplify repetition check

parent d8ec0a14
...@@ -209,9 +209,9 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf ) ...@@ -209,9 +209,9 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
} }
} }
if (p_sys->bargraph) { if (p_sys->bargraph && nbChannels > 0 && p_sys->counter++ > p_sys->bargraph_repetition) {
/* 6 - sent the message with the values for the BarGraph */ /* 6 - send the message with the values for the BarGraph */
if (nbChannels > 0 && p_sys->counter % p_sys->bargraph_repetition == 0) { p_sys->counter = 0;
char message[256]; char message[256];
size_t j = 0; size_t j = 0;
...@@ -227,10 +227,6 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf ) ...@@ -227,10 +227,6 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
var_SetString(p_filter->p_libvlc, "audiobargraph_v-i_values", var_SetString(p_filter->p_libvlc, "audiobargraph_v-i_values",
message); message);
} }
}
if (++p_sys->counter > p_sys->bargraph_repetition*100)
p_sys->counter = 0;
return p_in_buf; return p_in_buf;
} }
......
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