[pulseaudio-commits] r1472 - in /branches/lennart/src: daemon/main.c modules/alsa-util.c modules/module-detect.c modules/oss-util.c pulse/utf8.c pulsecore/g711.c pulsecore/pipe.c pulsecore/shm.c pulsecore/socket-client.c pulsecore/socket-util.c utils/padsp.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon Jun 11 06:53:32 PDT 2007


Author: lennart
Date: Mon Jun 11 15:53:31 2007
New Revision: 1472

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1472&root=3Dpulseaudio&vi=
ew=3Drev
Log:
make untabify

Modified:
    branches/lennart/src/daemon/main.c
    branches/lennart/src/modules/alsa-util.c
    branches/lennart/src/modules/module-detect.c
    branches/lennart/src/modules/oss-util.c
    branches/lennart/src/pulse/utf8.c
    branches/lennart/src/pulsecore/g711.c
    branches/lennart/src/pulsecore/pipe.c
    branches/lennart/src/pulsecore/shm.c
    branches/lennart/src/pulsecore/socket-client.c
    branches/lennart/src/pulsecore/socket-util.c
    branches/lennart/src/utils/padsp.c

Modified: branches/lennart/src/daemon/main.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/daemon/mai=
n.c?rev=3D1472&root=3Dpulseaudio&r1=3D1471&r2=3D1472&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/daemon/main.c (original)
+++ branches/lennart/src/daemon/main.c Mon Jun 11 15:53:31 2007
@@ -568,7 +568,7 @@
     assert(mainloop);
 =

     if (!(c =3D pa_core_new(pa_mainloop_get_api(mainloop), !conf->disable_=
shm))) {
-    	pa_log("pa_core_new() failed.");
+            pa_log("pa_core_new() failed.");
         goto finish;
     }
 =


Modified: branches/lennart/src/modules/alsa-util.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/modules/al=
sa-util.c?rev=3D1472&root=3Dpulseaudio&r1=3D1471&r2=3D1472&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/modules/alsa-util.c (original)
+++ branches/lennart/src/modules/alsa-util.c Mon Jun 11 15:53:31 2007
@@ -326,7 +326,7 @@
     if ((ret =3D snd_pcm_hw_params_malloc(&hwparams)) < 0 ||
         (ret =3D snd_pcm_hw_params_any(pcm_handle, hwparams)) < 0 ||
         (ret =3D snd_pcm_hw_params_set_rate_resample(pcm_handle, hwparams,=
 0)) < 0 ||
-    	(ret =3D snd_pcm_hw_params_set_access(pcm_handle, hwparams, SND_PCM_A=
CCESS_RW_INTERLEAVED)) < 0)
+            (ret =3D snd_pcm_hw_params_set_access(pcm_handle, hwparams, SN=
D_PCM_ACCESS_RW_INTERLEAVED)) < 0)
         goto finish;
 =

     if ((ret =3D set_format(pcm_handle, hwparams, &f)) < 0)

Modified: branches/lennart/src/modules/module-detect.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/modules/mo=
dule-detect.c?rev=3D1472&root=3Dpulseaudio&r1=3D1471&r2=3D1472&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/modules/module-detect.c (original)
+++ branches/lennart/src/modules/module-detect.c Mon Jun 11 15:53:31 2007
@@ -139,7 +139,7 @@
         line[strcspn(line, "\r\n")] =3D 0;
 =

         if (!b) {
-	     b =3D strcmp(line, "Audio devices:") =3D=3D 0 || strcmp(line, "Insta=
lled devices:") =3D=3D 0;
+             b =3D strcmp(line, "Audio devices:") =3D=3D 0 || strcmp(line,=
 "Installed devices:") =3D=3D 0;
             continue;
         }
 =

@@ -155,13 +155,13 @@
             if (!pa_module_load(c, "module-oss", args))
                 continue;
 =

-	} else if (sscanf(line, "pcm%u: ", &device) =3D=3D 1) {
+        } else if (sscanf(line, "pcm%u: ", &device) =3D=3D 1) {
             /* FreeBSD support, the devices are named /dev/dsp0.0, dsp0.1 =
and so on */
             snprintf(args, sizeof(args), "device=3D/dev/dsp%u.0", device);
 =

             if (!pa_module_load(c, "module-oss", args))
                 continue;
-	}
+        }
 =

         n++;
 =


Modified: branches/lennart/src/modules/oss-util.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/modules/os=
s-util.c?rev=3D1472&root=3Dpulseaudio&r1=3D1471&r2=3D1472&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/modules/oss-util.c (original)
+++ branches/lennart/src/modules/oss-util.c Mon Jun 11 15:53:31 2007
@@ -99,7 +99,7 @@
 #ifdef DSP_CAP_BIND
                  *pcaps & DSP_CAP_BIND ? " BIND" : "",
 #else
-		 "",
+                 "",
 #endif
                  *pcaps & DSP_CAP_COPROC ? " COPROC" : "",
                  *pcaps & DSP_CAP_DUPLEX ? " DUPLEX" : "",
@@ -122,7 +122,7 @@
 #ifdef DSP_CAP_MULTI
                  *pcaps & DSP_CAP_MULTI ? " MULTI" : "",
 #else
-		 "",
+                 "",
 #endif
 #ifdef DSP_CAP_OUTPUT
                  *pcaps & DSP_CAP_OUTPUT ? " OUTPUT" : "",

Modified: branches/lennart/src/pulse/utf8.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulse/utf8=
.c?rev=3D1472&root=3Dpulseaudio&r1=3D1471&r2=3D1472&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/pulse/utf8.c (original)
+++ branches/lennart/src/pulse/utf8.c Mon Jun 11 15:53:31 2007
@@ -37,7 +37,7 @@
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public

Modified: branches/lennart/src/pulsecore/g711.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
g711.c?rev=3D1472&root=3Dpulseaudio&r1=3D1471&r2=3D1472&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/g711.c (original)
+++ branches/lennart/src/pulsecore/g711.c Mon Jun 11 15:53:31 2007
@@ -43,30 +43,30 @@
 =

 #include "g711.h"
 =

-#define	SIGN_BIT	(0x80)		/* Sign bit for a A-law byte. */
-#define	QUANT_MASK	(0xf)		/* Quantization field mask. */
-#define	NSEGS		(8)		/* Number of A-law segments. */
-#define	SEG_SHIFT	(4)		/* Left shift for segment number. */
-#define	SEG_MASK	(0x70)		/* Segment field mask. */
+#define        SIGN_BIT        (0x80)                /* Sign bit for a A-l=
aw byte. */
+#define        QUANT_MASK        (0xf)                /* Quantization fiel=
d mask. */
+#define        NSEGS                (8)                /* Number of A-law =
segments. */
+#define        SEG_SHIFT        (4)                /* Left shift for segme=
nt number. */
+#define        SEG_MASK        (0x70)                /* Segment field mask=
. */
 =

 #if !defined(FAST_ALAW_CONVERSION) || !defined(FAST_ULAW_CONVERSION)
 static int16_t seg_aend[8] =3D {0x1F, 0x3F, 0x7F, 0xFF,
-			      0x1FF, 0x3FF, 0x7FF, 0xFFF};
+                              0x1FF, 0x3FF, 0x7FF, 0xFFF};
 static int16_t seg_uend[8] =3D {0x3F, 0x7F, 0xFF, 0x1FF,
-			      0x3FF, 0x7FF, 0xFFF, 0x1FFF};
+                              0x3FF, 0x7FF, 0xFFF, 0x1FFF};
 =

 static int16_t search(
-	int16_t	val,
-	int16_t *table,
-	int size)
+        int16_t        val,
+        int16_t *table,
+        int size)
 {
-	int i;
-
-	for (i =3D 0; i < size; i++) {
-		if (val <=3D *table++)
-			return (i);
-	}
-	return (size);
+        int i;
+
+        for (i =3D 0; i < size; i++) {
+                if (val <=3D *table++)
+                        return (i);
+        }
+        return (size);
 }
 #endif /* !FAST_*_CONVERSION */
 =

@@ -77,55 +77,55 @@
  * the data shifted such that it only contains information in the lower
  * 13-bits.
  *
- *		Linear Input Code	Compressed Code
- *	------------------------	---------------
- *	0000000wxyza			000wxyz
- *	0000001wxyza			001wxyz
- *	000001wxyzab			010wxyz
- *	00001wxyzabc			011wxyz
- *	0001wxyzabcd			100wxyz
- *	001wxyzabcde			101wxyz
- *	01wxyzabcdef			110wxyz
- *	1wxyzabcdefg			111wxyz
+ *                Linear Input Code        Compressed Code
+ *        ------------------------        ---------------
+ *        0000000wxyza                        000wxyz
+ *        0000001wxyza                        001wxyz
+ *        000001wxyzab                        010wxyz
+ *        00001wxyzabc                        011wxyz
+ *        0001wxyzabcd                        100wxyz
+ *        001wxyzabcde                        101wxyz
+ *        01wxyzabcdef                        110wxyz
+ *        1wxyzabcdefg                        111wxyz
  *
  * For further information see John C. Bellamy's Digital Telephony, 1982,
  * John Wiley & Sons, pps 98-111 and 472-476.
  */
 unsigned char st_13linear2alaw(
-	int16_t		pcm_val)	/* 2's complement (13-bit range) */
+        int16_t                pcm_val)        /* 2's complement (13-bit r=
ange) */
 {
-	int16_t		mask;
-	short		seg;
-	unsigned char	aval;
-
-	/* Have calling software do it since its already doing a shift
-	 * from 32-bits down to 16-bits.
-	 */
-	/* pcm_val =3D pcm_val >> 3; */
-
-	/* A-law using even bit inversion */
-	if (pcm_val >=3D 0) {
-		mask =3D 0xD5;		/* sign (7th) bit =3D 1 */
-	} else {
-		mask =3D 0x55;		/* sign bit =3D 0 */
-		pcm_val =3D -pcm_val - 1;
-	}
-
-	/* Convert the scaled magnitude to segment number. */
-	seg =3D search(pcm_val, seg_aend, 8);
-
-	/* Combine the sign, segment, and quantization bits. */
-
-	if (seg >=3D 8)		/* out of range, return maximum value. */
-		return (unsigned char) (0x7F ^ mask);
-	else {
-		aval =3D (unsigned char) seg << SEG_SHIFT;
-		if (seg < 2)
-			aval |=3D (pcm_val >> 1) & QUANT_MASK;
-		else
-			aval |=3D (pcm_val >> seg) & QUANT_MASK;
-		return (aval ^ mask);
-	}
+        int16_t                mask;
+        short                seg;
+        unsigned char        aval;
+
+        /* Have calling software do it since its already doing a shift
+         * from 32-bits down to 16-bits.
+         */
+        /* pcm_val =3D pcm_val >> 3; */
+
+        /* A-law using even bit inversion */
+        if (pcm_val >=3D 0) {
+                mask =3D 0xD5;                /* sign (7th) bit =3D 1 */
+        } else {
+                mask =3D 0x55;                /* sign bit =3D 0 */
+                pcm_val =3D -pcm_val - 1;
+        }
+
+        /* Convert the scaled magnitude to segment number. */
+        seg =3D search(pcm_val, seg_aend, 8);
+
+        /* Combine the sign, segment, and quantization bits. */
+
+        if (seg >=3D 8)                /* out of range, return maximum val=
ue. */
+                return (unsigned char) (0x7F ^ mask);
+        else {
+                aval =3D (unsigned char) seg << SEG_SHIFT;
+                if (seg < 2)
+                        aval |=3D (pcm_val >> 1) & QUANT_MASK;
+                else
+                        aval |=3D (pcm_val >> seg) & QUANT_MASK;
+                return (aval ^ mask);
+        }
 }
 =

 /*
@@ -133,31 +133,31 @@
  *
  */
 int16_t st_alaw2linear16(
-	unsigned char	a_val)
+        unsigned char        a_val)
 {
-	int16_t t;
-	int16_t seg;
-
-	a_val ^=3D 0x55;
-
-	t =3D (a_val & QUANT_MASK) << 4;
-	seg =3D ((unsigned)a_val & SEG_MASK) >> SEG_SHIFT;
-	switch (seg) {
-	case 0:
-		t +=3D 8;
-		break;
-	case 1:
-		t +=3D 0x108;
-		break;
-	default:
-		t +=3D 0x108;
-		t <<=3D seg - 1;
-	}
-	return ((a_val & SIGN_BIT) ? t : -t);
+        int16_t t;
+        int16_t seg;
+
+        a_val ^=3D 0x55;
+
+        t =3D (a_val & QUANT_MASK) << 4;
+        seg =3D ((unsigned)a_val & SEG_MASK) >> SEG_SHIFT;
+        switch (seg) {
+        case 0:
+                t +=3D 8;
+                break;
+        case 1:
+                t +=3D 0x108;
+                break;
+        default:
+                t +=3D 0x108;
+                t <<=3D seg - 1;
+        }
+        return ((a_val & SIGN_BIT) ? t : -t);
 }
 #endif /* !FAST_ALAW_CONVERSION */
 =

-#define	BIAS		(0x84)		/* Bias for linear code. */
+#define        BIAS                (0x84)                /* Bias for linea=
r code. */
 #define CLIP            8159
 =

 #ifndef FAST_ULAW_CONVERSION
@@ -171,16 +171,16 @@
  * is biased by adding 33 which shifts the encoding range from (0 - 8158) =
to
  * (33 - 8191). The result can be seen in the following encoding table:
  *
- *	Biased Linear Input Code	Compressed Code
- *	------------------------	---------------
- *	00000001wxyza			000wxyz
- *	0000001wxyzab			001wxyz
- *	000001wxyzabc			010wxyz
- *	00001wxyzabcd			011wxyz
- *	0001wxyzabcde			100wxyz
- *	001wxyzabcdef			101wxyz
- *	01wxyzabcdefg			110wxyz
- *	1wxyzabcdefgh			111wxyz
+ *        Biased Linear Input Code        Compressed Code
+ *        ------------------------        ---------------
+ *        00000001wxyza                        000wxyz
+ *        0000001wxyzab                        001wxyz
+ *        000001wxyzabc                        010wxyz
+ *        00001wxyzabcd                        011wxyz
+ *        0001wxyzabcde                        100wxyz
+ *        001wxyzabcdef                        101wxyz
+ *        01wxyzabcdefg                        110wxyz
+ *        1wxyzabcdefgh                        111wxyz
  *
  * Each biased linear code has a leading 1 which identifies the segment
  * number. The value of the segment number is equal to 7 minus the number
@@ -194,41 +194,41 @@
  * John Wiley & Sons, pps 98-111 and 472-476.
  */
 unsigned char st_14linear2ulaw(
-	int16_t		pcm_val)	/* 2's complement (14-bit range) */
+        int16_t                pcm_val)        /* 2's complement (14-bit r=
ange) */
 {
-	int16_t		mask;
-	int16_t		seg;
-	unsigned char	uval;
-
-	/* Have calling software do it since its already doing a shift
-	 * from 32-bits down to 16-bits.
-	 */
-	/* pcm_val =3D pcm_val >> 2; */
-
-	/* u-law inverts all bits */
-	/* Get the sign and the magnitude of the value. */
-	if (pcm_val < 0) {
-		pcm_val =3D -pcm_val;
-		mask =3D 0x7F;
-	} else {
-		mask =3D 0xFF;
-	}
-        if ( pcm_val > CLIP ) pcm_val =3D CLIP;		/* clip the magnitude */
-	pcm_val +=3D (BIAS >> 2);
-
-	/* Convert the scaled magnitude to segment number. */
-	seg =3D search(pcm_val, seg_uend, 8);
-
-	/*
-	 * Combine the sign, segment, quantization bits;
-	 * and complement the code word.
-	 */
-	if (seg >=3D 8)		/* out of range, return maximum value. */
-		return (unsigned char) (0x7F ^ mask);
-	else {
-		uval =3D (unsigned char) (seg << 4) | ((pcm_val >> (seg + 1)) & 0xF);
-		return (uval ^ mask);
-	}
+        int16_t                mask;
+        int16_t                seg;
+        unsigned char        uval;
+
+        /* Have calling software do it since its already doing a shift
+         * from 32-bits down to 16-bits.
+         */
+        /* pcm_val =3D pcm_val >> 2; */
+
+        /* u-law inverts all bits */
+        /* Get the sign and the magnitude of the value. */
+        if (pcm_val < 0) {
+                pcm_val =3D -pcm_val;
+                mask =3D 0x7F;
+        } else {
+                mask =3D 0xFF;
+        }
+        if ( pcm_val > CLIP ) pcm_val =3D CLIP;                /* clip the=
 magnitude */
+        pcm_val +=3D (BIAS >> 2);
+
+        /* Convert the scaled magnitude to segment number. */
+        seg =3D search(pcm_val, seg_uend, 8);
+
+        /*
+         * Combine the sign, segment, quantization bits;
+         * and complement the code word.
+         */
+        if (seg >=3D 8)                /* out of range, return maximum val=
ue. */
+                return (unsigned char) (0x7F ^ mask);
+        else {
+                uval =3D (unsigned char) (seg << 4) | ((pcm_val >> (seg + =
1)) & 0xF);
+                return (uval ^ mask);
+        }
 =

 }
 =

@@ -242,21 +242,21 @@
  * original code word. This is in keeping with ISDN conventions.
  */
 int16_t st_ulaw2linear16(
-	unsigned char	u_val)
+        unsigned char        u_val)
 {
-	int16_t		t;
-
-	/* Complement to obtain normal u-law value. */
-	u_val =3D ~u_val;
-
-	/*
-	 * Extract and bias the quantization bits. Then
-	 * shift up by the segment number and subtract out the bias.
-	 */
-	t =3D ((u_val & QUANT_MASK) << 3) + BIAS;
-	t <<=3D ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT;
-
-	return ((u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS));
+        int16_t                t;
+
+        /* Complement to obtain normal u-law value. */
+        u_val =3D ~u_val;
+
+        /*
+         * Extract and bias the quantization bits. Then
+         * shift up by the segment number and subtract out the bias.
+         */
+        t =3D ((u_val & QUANT_MASK) << 3) + BIAS;
+        t <<=3D ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT;
+
+        return ((u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS));
 }
 #endif /* !FAST_ULAW_CONVERSION */
 =

@@ -2413,52 +2413,52 @@
     printf("int16_t _st_alaw2linear16[256] =3D {\n  ");
     for (x =3D 0; x < 256; x++)
     {
-	printf("%8d,", st_alaw2linear16(x));
-	y++;
-	if (y =3D=3D 7)
-	{
-	    y =3D 0;
-	    printf("\n  ");
-	}
+        printf("%8d,", st_alaw2linear16(x));
+        y++;
+        if (y =3D=3D 7)
+        {
+            y =3D 0;
+            printf("\n  ");
+        }
     }
 =

     printf("\n};\n\nuint8_t _st_13linear2alaw[0x2000] =3D {\n  ");
     y =3D 0;
     for (x =3D 0; x < 0x2000; x++)
     {
-	printf(" 0x%02x,", st_13linear2alaw((-0x1000)+x));
-	y++;
-	if (y =3D=3D 12)
-	{
-	    y =3D 0;
-	    printf("\n  ");
-	}
+        printf(" 0x%02x,", st_13linear2alaw((-0x1000)+x));
+        y++;
+        if (y =3D=3D 12)
+        {
+            y =3D 0;
+            printf("\n  ");
+        }
     }
 =

     printf("\n};\n\nint16_t _st_ulaw2linear16[256] =3D {\n  ");
     y =3D 0;
     for (x =3D 0; x < 256; x++)
     {
-	printf("%8d,", st_ulaw2linear16(x));
-	y++;
-	if (y =3D=3D 7)
-	{
-	    y =3D 0;
-	    printf("\n  ");
-	}
+        printf("%8d,", st_ulaw2linear16(x));
+        y++;
+        if (y =3D=3D 7)
+        {
+            y =3D 0;
+            printf("\n  ");
+        }
     }
 =

     printf("\n};\n\nuint8_t _st_14linear2ulaw[0x4000] =3D {\n  ");
     y =3D 0;
     for (x =3D 0; x < 0x4000; x++)
     {
-	printf(" 0x%02x,", st_14linear2ulaw((-0x2000)+x));
-	y++;
-	if (y =3D=3D 12)
-	{
-	    y =3D 0;
-	    printf("\n  ");
-	}
+        printf(" 0x%02x,", st_14linear2ulaw((-0x2000)+x));
+        y++;
+        if (y =3D=3D 12)
+        {
+            y =3D 0;
+            printf("\n  ");
+        }
     }
     printf("\n};\n");
 =

@@ -2468,64 +2468,64 @@
 /* The following is not used by SoX but kept for reference */
 #if 0
 /* copy from CCITT G.711 specifications */
-unsigned char _u2a[128] =3D {			/* u- to A-law conversions */
-	1,	1,	2,	2,	3,	3,	4,	4,
-	5,	5,	6,	6,	7,	7,	8,	8,
-	9,	10,	11,	12,	13,	14,	15,	16,
-	17,	18,	19,	20,	21,	22,	23,	24,
-	25,	27,	29,	31,	33,	34,	35,	36,
-	37,	38,	39,	40,	41,	42,	43,	44,
-	46,	48,	49,	50,	51,	52,	53,	54,
-	55,	56,	57,	58,	59,	60,	61,	62,
-	64,	65,	66,	67,	68,	69,	70,	71,
-	72,	73,	74,	75,	76,	77,	78,	79,
+unsigned char _u2a[128] =3D {                        /* u- to A-law conver=
sions */
+        1,        1,        2,        2,        3,        3,        4,    =
    4,
+        5,        5,        6,        6,        7,        7,        8,    =
    8,
+        9,        10,        11,        12,        13,        14,        1=
5,        16,
+        17,        18,        19,        20,        21,        22,        =
23,        24,
+        25,        27,        29,        31,        33,        34,        =
35,        36,
+        37,        38,        39,        40,        41,        42,        =
43,        44,
+        46,        48,        49,        50,        51,        52,        =
53,        54,
+        55,        56,        57,        58,        59,        60,        =
61,        62,
+        64,        65,        66,        67,        68,        69,        =
70,        71,
+        72,        73,        74,        75,        76,        77,        =
78,        79,
 /* corrected:
-	81,	82,	83,	84,	85,	86,	87,	88,
+        81,        82,        83,        84,        85,        86,        =
87,        88,
    should be: */
-	80,	82,	83,	84,	85,	86,	87,	88,
-	89,	90,	91,	92,	93,	94,	95,	96,
-	97,	98,	99,	100,	101,	102,	103,	104,
-	105,	106,	107,	108,	109,	110,	111,	112,
-	113,	114,	115,	116,	117,	118,	119,	120,
-	121,	122,	123,	124,	125,	126,	127,	128};
-
-unsigned char _a2u[128] =3D {			/* A- to u-law conversions */
-	1,	3,	5,	7,	9,	11,	13,	15,
-	16,	17,	18,	19,	20,	21,	22,	23,
-	24,	25,	26,	27,	28,	29,	30,	31,
-	32,	32,	33,	33,	34,	34,	35,	35,
-	36,	37,	38,	39,	40,	41,	42,	43,
-	44,	45,	46,	47,	48,	48,	49,	49,
-	50,	51,	52,	53,	54,	55,	56,	57,
-	58,	59,	60,	61,	62,	63,	64,	64,
-	65,	66,	67,	68,	69,	70,	71,	72,
+        80,        82,        83,        84,        85,        86,        =
87,        88,
+        89,        90,        91,        92,        93,        94,        =
95,        96,
+        97,        98,        99,        100,        101,        102,     =
   103,        104,
+        105,        106,        107,        108,        109,        110,  =
      111,        112,
+        113,        114,        115,        116,        117,        118,  =
      119,        120,
+        121,        122,        123,        124,        125,        126,  =
      127,        128};
+
+unsigned char _a2u[128] =3D {                        /* A- to u-law conver=
sions */
+        1,        3,        5,        7,        9,        11,        13,  =
      15,
+        16,        17,        18,        19,        20,        21,        =
22,        23,
+        24,        25,        26,        27,        28,        29,        =
30,        31,
+        32,        32,        33,        33,        34,        34,        =
35,        35,
+        36,        37,        38,        39,        40,        41,        =
42,        43,
+        44,        45,        46,        47,        48,        48,        =
49,        49,
+        50,        51,        52,        53,        54,        55,        =
56,        57,
+        58,        59,        60,        61,        62,        63,        =
64,        64,
+        65,        66,        67,        68,        69,        70,        =
71,        72,
 /* corrected:
-	73,	74,	75,	76,	77,	78,	79,	79,
+        73,        74,        75,        76,        77,        78,        =
79,        79,
    should be: */
-	73,	74,	75,	76,	77,	78,	79,	80,
-
-	80,	81,	82,	83,	84,	85,	86,	87,
-	88,	89,	90,	91,	92,	93,	94,	95,
-	96,	97,	98,	99,	100,	101,	102,	103,
-	104,	105,	106,	107,	108,	109,	110,	111,
-	112,	113,	114,	115,	116,	117,	118,	119,
-	120,	121,	122,	123,	124,	125,	126,	127};
+        73,        74,        75,        76,        77,        78,        =
79,        80,
+
+        80,        81,        82,        83,        84,        85,        =
86,        87,
+        88,        89,        90,        91,        92,        93,        =
94,        95,
+        96,        97,        98,        99,        100,        101,      =
  102,        103,
+        104,        105,        106,        107,        108,        109,  =
      110,        111,
+        112,        113,        114,        115,        116,        117,  =
      118,        119,
+        120,        121,        122,        123,        124,        125,  =
      126,        127};
 =

 /* A-law to u-law conversion */
 unsigned char st_alaw2ulaw(
-	unsigned char	aval)
+        unsigned char        aval)
 {
-	aval &=3D 0xff;
-	return (unsigned char) ((aval & 0x80) ? (0xFF ^ _a2u[aval ^ 0xD5]) :
-	    (0x7F ^ _a2u[aval ^ 0x55]));
+        aval &=3D 0xff;
+        return (unsigned char) ((aval & 0x80) ? (0xFF ^ _a2u[aval ^ 0xD5])=
 :
+            (0x7F ^ _a2u[aval ^ 0x55]));
 }
 =

 /* u-law to A-law conversion */
 unsigned char st_ulaw2alaw(
-	unsigned char	uval)
+        unsigned char        uval)
 {
-	uval &=3D 0xff;
-	return (unsigned char) ((uval & 0x80) ? (0xD5 ^ (_u2a[0xFF ^ uval] - 1)) :
-	    (unsigned char) (0x55 ^ (_u2a[0x7F ^ uval] - 1)));
+        uval &=3D 0xff;
+        return (unsigned char) ((uval & 0x80) ? (0xD5 ^ (_u2a[0xFF ^ uval]=
 - 1)) :
+            (unsigned char) (0x55 ^ (_u2a[0x7F ^ uval] - 1)));
 }
 #endif

Modified: branches/lennart/src/pulsecore/pipe.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
pipe.c?rev=3D1472&root=3Dpulseaudio&r1=3D1471&r2=3D1472&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/pipe.c (original)
+++ branches/lennart/src/pulsecore/pipe.c Mon Jun 11 15:53:31 2007
@@ -149,14 +149,14 @@
     return 0;
 =

 error:
-	if (listener >=3D 0)
-		pa_close(listener);
-	if (filedes[0] >=3D 0)
-		pa_close(filedes[0]);
-	if (filedes[1] >=3D 0)
-		pa_close(filedes[0]);
+        if (listener >=3D 0)
+                pa_close(listener);
+        if (filedes[0] >=3D 0)
+                pa_close(filedes[0]);
+        if (filedes[1] >=3D 0)
+                pa_close(filedes[0]);
 =

-	return -1;
+        return -1;
 }
 =

 #endif /* HAVE_PIPE */

Modified: branches/lennart/src/pulsecore/shm.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
shm.c?rev=3D1472&root=3Dpulseaudio&r1=3D1471&r2=3D1472&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/shm.c (original)
+++ branches/lennart/src/pulsecore/shm.c Mon Jun 11 15:53:31 2007
@@ -113,7 +113,7 @@
         close(fd);
         m->do_unlink =3D 1;
 #else
-		return -1;
+                return -1;
 #endif
     }
 =

@@ -139,36 +139,36 @@
     assert(m->size > 0);
 =

 #ifdef MAP_FAILED
-	assert(m->ptr !=3D MAP_FAILED);
-#endif
-
-	if (!m->shared) {
+        assert(m->ptr !=3D MAP_FAILED);
+#endif
+
+        if (!m->shared) {
 #ifdef MAP_ANONYMOUS
-	    if (munmap(m->ptr, m->size) < 0)
-	        pa_log("munmap() failed: %s", pa_cstrerror(errno));
+            if (munmap(m->ptr, m->size) < 0)
+                pa_log("munmap() failed: %s", pa_cstrerror(errno));
 #elif defined(HAVE_POSIX_MEMALIGN)
         free(m->ptr);
 #else
         pa_xfree(m->ptr);
 #endif
-	} else {
-#ifdef HAVE_SHM_OPEN
-	    if (munmap(m->ptr, m->size) < 0)
-	        pa_log("munmap() failed: %s", pa_cstrerror(errno));
-
-	    if (m->do_unlink) {
-		    char fn[32];
+        } else {
+#ifdef HAVE_SHM_OPEN
+            if (munmap(m->ptr, m->size) < 0)
+                pa_log("munmap() failed: %s", pa_cstrerror(errno));
+
+            if (m->do_unlink) {
+                    char fn[32];
 =

                     segment_name(fn, sizeof(fn), m->id);
 =

                     if (shm_unlink(fn) < 0)
                         pa_log(" shm_unlink(%s) failed: %s", fn, pa_cstrer=
ror(errno));
-	    }
-#else
-		/* We shouldn't be here without shm support */
-		assert(0);
-#endif
-	}
+            }
+#else
+                /* We shouldn't be here without shm support */
+                assert(0);
+#endif
+        }
 =

     memset(m, 0, sizeof(*m));
 }
@@ -182,7 +182,7 @@
     assert(offset+size <=3D m->size);
 =

 #ifdef MAP_FAILED
-	assert(m->ptr !=3D MAP_FAILED);
+        assert(m->ptr !=3D MAP_FAILED);
 #endif
 =

     /* You're welcome to implement this as NOOP on systems that don't
@@ -270,7 +270,7 @@
 #else /* HAVE_SHM_OPEN */
 =

 int pa_shm_attach_ro(pa_shm *m, unsigned id) {
-	return -1;
+        return -1;
 }
 =

 #endif /* HAVE_SHM_OPEN */

Modified: branches/lennart/src/pulsecore/socket-client.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
socket-client.c?rev=3D1472&root=3Dpulseaudio&r1=3D1471&r2=3D1472&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/socket-client.c (original)
+++ branches/lennart/src/pulsecore/socket-client.c Mon Jun 11 15:53:31 2007
@@ -435,7 +435,7 @@
     switch (a.type) {
         case PA_PARSED_ADDRESS_UNIX:
             if ((c =3D pa_socket_client_new_unix(m, a.path_or_host)))
-            	start_timeout(c);
+                    start_timeout(c);
             break;
 =

         case PA_PARSED_ADDRESS_TCP4:  /* Fallthrough */
@@ -479,7 +479,7 @@
                 if (res->ai_addr) {
                     if ((c =3D pa_socket_client_new_sockaddr(m, res->ai_ad=
dr, res->ai_addrlen)))
                         start_timeout(c);
-				}
+                                }
 =

                 freeaddrinfo(res);
 #else /* HAVE_GETADDRINFO */
@@ -507,7 +507,7 @@
                 s.sin_port =3D htons(a.port);
 =

                 if ((c =3D pa_socket_client_new_sockaddr(m, (struct sockad=
dr*)&s, sizeof(s))))
-                	start_timeout(c);
+                        start_timeout(c);
 #endif /* HAVE_GETADDRINFO */
             }
 #endif /* HAVE_LIBASYNCNS */

Modified: branches/lennart/src/pulsecore/socket-util.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
socket-util.c?rev=3D1472&root=3Dpulseaudio&r1=3D1471&r2=3D1472&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/socket-util.c (original)
+++ branches/lennart/src/pulsecore/socket-util.c Mon Jun 11 15:53:31 2007
@@ -177,7 +177,7 @@
 #endif
 =

 #if defined(IPTOS_LOWDELAY) && defined(IP_TOS) && (defined(SOL_IP) || \
-	defined(IPPROTO_IP))
+        defined(IPPROTO_IP))
     tos =3D IPTOS_LOWDELAY;
 #ifdef SOL_IP
     if (setsockopt(fd, SOL_IP, IP_TOS, (void*)&tos, sizeof(tos)) < 0)

Modified: branches/lennart/src/utils/padsp.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/utils/pads=
p.c?rev=3D1472&root=3Dpulseaudio&r1=3D1471&r2=3D1472&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/utils/padsp.c (original)
+++ branches/lennart/src/utils/padsp.c Mon Jun 11 15:53:31 2007
@@ -259,9 +259,9 @@
 =

 static void debug(int level, const char *format, ...) PA_GCC_PRINTF_ATTR(2=
,3);
 =

-#define DEBUG_LEVEL_ALWAYS		0
-#define DEBUG_LEVEL_NORMAL		1
-#define DEBUG_LEVEL_VERBOSE		2
+#define DEBUG_LEVEL_ALWAYS                0
+#define DEBUG_LEVEL_NORMAL                1
+#define DEBUG_LEVEL_VERBOSE                2
 =

 static void debug(int level, const char *format, ...) {
     va_list ap;
@@ -421,7 +421,7 @@
     pthread_mutex_lock(&i->mutex);
     assert(i->ref >=3D 1);
     r =3D --i->ref;
-	debug(DEBUG_LEVEL_VERBOSE, __FILE__": ref--, now %i\n", i->ref);
+        debug(DEBUG_LEVEL_VERBOSE, __FILE__": ref--, now %i\n", i->ref);
     pthread_mutex_unlock(&i->mutex);
 =

     if (r <=3D 0)
@@ -1395,7 +1395,7 @@
 =

     if (flags !=3D O_RDONLY
 #ifdef O_LARGEFILE
-	&& flags !=3D (O_RDONLY|O_LARGEFILE)
+        && flags !=3D (O_RDONLY|O_LARGEFILE)
 #endif
        ) {
         *_errno =3D EACCES;
@@ -1446,7 +1446,7 @@
     va_start(args, flags);
     if (flags & O_CREAT) {
       if (sizeof(mode_t) < sizeof(int))
-	mode =3D va_arg(args, int);
+        mode =3D va_arg(args, int);
       else
         mode =3D va_arg(args, mode_t);
     }
@@ -2023,9 +2023,9 @@
 =

             *(int*)  argp =3D DSP_CAP_DUPLEX | DSP_CAP_TRIGGER
 #ifdef DSP_CAP_MULTI
-	      | DSP_CAP_MULTI
+              | DSP_CAP_MULTI
 #endif
-	      ;
+              ;
             break;
 =

         case SNDCTL_DSP_GETODELAY: {
@@ -2279,8 +2279,8 @@
 =

         case SNDCTL_DSP_SETDUPLEX:
             debug(DEBUG_LEVEL_NORMAL, __FILE__": SNDCTL_DSP_SETDUPLEX\n");
-	    /* this is a no-op */
-	    break;
+            /* this is a no-op */
+            break;
 =

         default:
             debug(DEBUG_LEVEL_NORMAL, __FILE__": unknown ioctl 0x%08lx\n",=
 request);




More information about the pulseaudio-commits mailing list