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

trivial_mixer: fix upmix/downmix

parent 7c653e6a
...@@ -71,7 +71,7 @@ static block_t *Upmix( filter_t *p_filter, block_t *p_in_buf ) ...@@ -71,7 +71,7 @@ static block_t *Upmix( filter_t *p_filter, block_t *p_in_buf )
float *p_dest = (float *)p_out_buf->p_buffer; float *p_dest = (float *)p_out_buf->p_buffer;
const float *p_src = (float *)p_in_buf->p_buffer; const float *p_src = (float *)p_in_buf->p_buffer;
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];
...@@ -97,7 +97,7 @@ static block_t *Downmix( filter_t *p_filter, block_t *p_buf ) ...@@ -97,7 +97,7 @@ static block_t *Downmix( filter_t *p_filter, block_t *p_buf )
float *p_dest = (float *)p_buf->p_buffer; float *p_dest = (float *)p_buf->p_buffer;
const float *p_src = p_dest; const float *p_src = p_dest;
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 % i_input_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