[pulseaudio-commits] r1412 - in /trunk/src/pulsecore: sample-util.c sconv.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Wed Nov 8 05:03:37 PST 2006
Author: ossman
Date: Wed Nov 8 14:03:35 2006
New Revision: 1412
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1412&root=3Dpulseaudio&vi=
ew=3Drev
Log:
Support reversed endian floats. (closes #28) (closes #35)
Modified:
trunk/src/pulsecore/sample-util.c
trunk/src/pulsecore/sconv.c
Modified: trunk/src/pulsecore/sample-util.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/sample-util=
.c?rev=3D1412&root=3Dpulseaudio&r1=3D1411&r2=3D1412&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
--- trunk/src/pulsecore/sample-util.c (original)
+++ trunk/src/pulsecore/sample-util.c Wed Nov 8 14:03:35 2006
@@ -68,6 +68,7 @@
case PA_SAMPLE_S16LE:
case PA_SAMPLE_S16BE:
case PA_SAMPLE_FLOAT32:
+ case PA_SAMPLE_FLOAT32RE:
c =3D 0;
break;
case PA_SAMPLE_ALAW:
Modified: trunk/src/pulsecore/sconv.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/sconv.c?rev=
=3D1412&root=3Dpulseaudio&r1=3D1411&r2=3D1412&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
--- trunk/src/pulsecore/sconv.c (original)
+++ trunk/src/pulsecore/sconv.c Wed Nov 8 14:03:35 2006
@@ -72,6 +72,22 @@
oil_memcpy(b, a, sizeof(float) * n);
}
=
+static void float32re_to_float32ne(unsigned n, const void *a, float *b) {
+ assert(a);
+ assert(b);
+
+ while (n-- > 0)
+ ((uint32_t *)b)[n] =3D UINT32_SWAP (((uint32_t *)a)[n]);
+}
+
+static void float32re_from_float32ne(unsigned n, const float *a, void *b) {
+ assert(a);
+ assert(b);
+
+ while (n-- > 0)
+ ((uint32_t *)b)[n] =3D UINT32_SWAP (((uint32_t *)a)[n]);
+}
+
static void ulaw_to_float32ne(unsigned n, const void *a, float *b) {
const uint8_t *ca =3D a;
=
@@ -140,6 +156,8 @@
return pa_sconv_s16be_to_float32ne;
case PA_SAMPLE_FLOAT32NE:
return float32ne_to_float32ne;
+ case PA_SAMPLE_FLOAT32RE:
+ return float32re_to_float32ne;
case PA_SAMPLE_ALAW:
return alaw_to_float32ne;
case PA_SAMPLE_ULAW:
@@ -159,6 +177,8 @@
return pa_sconv_s16be_from_float32ne;
case PA_SAMPLE_FLOAT32NE:
return float32ne_from_float32ne;
+ case PA_SAMPLE_FLOAT32RE:
+ return float32re_from_float32ne;
case PA_SAMPLE_ALAW:
return alaw_from_float32ne;
case PA_SAMPLE_ULAW:
More information about the pulseaudio-commits
mailing list