Commit eb1795eb authored by bigben's avatar bigben

Fix a mistake in the resampling algorithm (hope I didn't forget any place)

parent 28efeeec
......@@ -188,7 +188,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{
i_chan--;
p_out[i_chan] = p_prev_sample[i_chan];
p_out[i_chan] += ( (p_prev_sample[i_chan] - p_in[i_chan])
p_out[i_chan] += ( p_in[i_chan] - (p_prev_sample[i_chan] )
* p_sys->i_remainder
/ p_filter->output.i_rate );
}
......@@ -209,8 +209,8 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{
i_chan--;
p_out[i_chan] = p_in[i_chan];
p_out[i_chan] += ( (p_in[i_chan] -
p_in[i_chan + i_nb_channels])
p_out[i_chan] += ( ( p_in[i_chan + i_nb_channels]
- p_in[i_chan] )
* p_sys->i_remainder / p_filter->output.i_rate );
}
p_out += i_nb_channels;
......
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