]> code.delx.au - pulseaudio/commitdiff
resampler: Cleanup, index of memchunks is not used
authorPeter Meerwald <pmeerw@pmeerw.net>
Sun, 21 Jul 2013 21:14:45 +0000 (23:14 +0200)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Fri, 8 Nov 2013 14:14:43 +0000 (16:14 +0200)
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
src/pulsecore/resampler.c

index 638b53f7f14070ae45e3c71b4580b48ae6348d92..3ac8f5e5950ca75e33d1e6343bd5e2d286bf491b 100644 (file)
@@ -1168,7 +1168,6 @@ static pa_memchunk* convert_to_work_format(pa_resampler *r, pa_memchunk *input)
 
     n_samples = (unsigned) ((input->length / r->i_fz) * r->i_ss.channels);
 
-    r->to_work_format_buf.index = 0;
     r->to_work_format_buf.length = r->w_sz * n_samples;
     r->to_work_format_buf_size = fit_buf(r, &r->to_work_format_buf, r->to_work_format_buf_size);
 
@@ -1283,7 +1282,6 @@ static pa_memchunk *resample(pa_resampler *r, pa_memchunk *input) {
 
     out_n_frames = ((in_n_frames*r->o_ss.rate)/r->i_ss.rate)+EXTRA_FRAMES;
 
-    r->resample_buf.index = 0;
     r->resample_buf.length = r->w_fz * out_n_frames;
     r->resample_buf_size = fit_buf(r, &r->resample_buf, r->resample_buf_size);
 
@@ -1316,7 +1314,6 @@ static pa_memchunk *convert_from_work_format(pa_resampler *r, pa_memchunk *input
     n_samples = (unsigned) (input->length / r->w_sz);
     n_frames = n_samples / r->o_ss.channels;
 
-    r->from_work_format_buf.index = 0;
     r->from_work_format_buf.length = r->o_fz * n_frames;
     r->from_work_format_buf_size = fit_buf(r, &r->from_work_format_buf, r->from_work_format_buf_size);