[pulseaudio-commits] r1523 - /branches/lennart/src/pulsecore/resampler.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Sat Jul 14 04:26:55 PDT 2007
Author: lennart
Date: Sat Jul 14 13:26:55 2007
New Revision: 1523
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1523&root=3Dpulseaudio&vi=
ew=3Drev
Log:
Fix a couple of typos in the resampler code
Modified:
branches/lennart/src/pulsecore/resampler.c
Modified: branches/lennart/src/pulsecore/resampler.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
resampler.c?rev=3D1523&root=3Dpulseaudio&r1=3D1522&r2=3D1523&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/resampler.c (original)
+++ branches/lennart/src/pulsecore/resampler.c Sat Jul 14 13:26:55 2007
@@ -315,7 +315,9 @@
=
src =3D (uint8_t*) pa_memblock_acquire(input->memblock) + input->index;
dst =3D (uint8_t*) pa_memblock_acquire(u->buf1.memblock);
+
u->to_float32ne_func(n_samples, src, dst);
+
pa_memblock_release(input->memblock);
pa_memblock_release(u->buf1.memblock);
=
@@ -402,9 +404,9 @@
return input;
=
in_n_samples =3D input->length / sizeof(float);
- in_n_frames =3D in_n_samples * r->o_ss.channels;
-
- out_n_frames =3D (in_n_frames*r->o_ss.rate/r->i_ss.rate)+1024;
+ in_n_frames =3D in_n_samples / r->o_ss.channels;
+
+ out_n_frames =3D ((in_n_frames*r->o_ss.rate)/r->i_ss.rate)+1024;
out_n_samples =3D out_n_frames * r->o_ss.channels;
=
if (!u->buf3.memblock || u->buf3_samples < out_n_samples) {
@@ -464,7 +466,7 @@
u->buf4.index =3D 0;
}
=
- src =3D (uint8_t*) pa_memblock_acquire(input->memblock) + input->lengt=
h;
+ src =3D (uint8_t*) pa_memblock_acquire(input->memblock) + input->index;
dst =3D pa_memblock_acquire(u->buf4.memblock);
u->from_float32ne_func(n_samples, src, dst);
pa_memblock_release(input->memblock);
More information about the pulseaudio-commits
mailing list