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

trivial_mixer: fix arithmetic

parent 636b6c31
...@@ -74,7 +74,7 @@ static block_t *Upmix( filter_t *p_filter, block_t *p_in_buf ) ...@@ -74,7 +74,7 @@ static block_t *Upmix( filter_t *p_filter, block_t *p_in_buf )
for( size_t i = 0; i < p_in_buf->i_nb_samples; i++ ) for( size_t i = 0; i < p_in_buf->i_nb_samples; i++ )
{ {
for( unsigned j = 0; j < i_output_nb; j++ ) for( unsigned j = 0; j < i_output_nb; j++ )
p_dest[j] = p_src[j]; p_dest[j] = p_src[j % i_input_nb];
p_src += i_input_nb; p_src += i_input_nb;
p_dest += i_output_nb; p_dest += i_output_nb;
...@@ -100,7 +100,7 @@ static block_t *Downmix( filter_t *p_filter, block_t *p_buf ) ...@@ -100,7 +100,7 @@ static block_t *Downmix( filter_t *p_filter, block_t *p_buf )
for( size_t i = 0; i < p_buf->i_nb_samples; i++ ) for( size_t i = 0; i < p_buf->i_nb_samples; i++ )
{ {
for( unsigned j = 0; j < i_output_nb; j++ ) for( unsigned j = 0; j < i_output_nb; j++ )
p_dest[j] = p_src[j % i_input_nb]; p_dest[j] = p_src[j];
p_src += i_input_nb; p_src += i_input_nb;
p_dest += i_output_nb; p_dest += i_output_nb;
......
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