summaryrefslogtreecommitdiffstats
path: root/gst/law/mulaw-conversion.c
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-03-15 19:32:27 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-03-15 19:32:27 +0000
commit6cc1c73d2baa95c46edc04f57cbe9ed690dc2f21 (patch)
tree82b5546809a42a56a7bc18bacf8ed6e209ad006e /gst/law/mulaw-conversion.c
parentd07ec45fa47fbd0e36224e11bcd8ba2faee1a78c (diff)
don't mix tabs and spaces
Original commit message from CVS: don't mix tabs and spaces
Diffstat (limited to 'gst/law/mulaw-conversion.c')
-rw-r--r--gst/law/mulaw-conversion.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gst/law/mulaw-conversion.c b/gst/law/mulaw-conversion.c
index fa4db3cb..a05d7bdc 100644
--- a/gst/law/mulaw-conversion.c
+++ b/gst/law/mulaw-conversion.c
@@ -25,8 +25,8 @@
#include <glib.h>
-#define ZEROTRAP /* turn on the trap as per the MIL-STD */
-#define BIAS 0x84 /* define the add-in bias for 16 bit samples */
+#define ZEROTRAP /* turn on the trap as per the MIL-STD */
+#define BIAS 0x84 /* define the add-in bias for 16 bit samples */
#define CLIP 32635
void
@@ -56,11 +56,11 @@ mulaw_encode (gint16 * in, guint8 * out, gint numsamples)
for (i = 0; i < numsamples; i++) {
sample = in[i];
/** get the sample into sign-magnitude **/
- sign = (sample >> 8) & 0x80; /* set aside the sign */
+ sign = (sample >> 8) & 0x80; /* set aside the sign */
if (sign != 0)
- sample = -sample; /* get magnitude */
+ sample = -sample; /* get magnitude */
if (sample > CLIP)
- sample = CLIP; /* clip the magnitude */
+ sample = CLIP; /* clip the magnitude */
/** convert from 16 bit linear to ulaw **/
sample = sample + BIAS;
exponent = exp_lut[(sample >> 7) & 0xFF];
@@ -68,7 +68,7 @@ mulaw_encode (gint16 * in, guint8 * out, gint numsamples)
ulawbyte = ~(sign | (exponent << 4) | mantissa);
#ifdef ZEROTRAP
if (ulawbyte == 0)
- ulawbyte = 0x02; /* optional CCITT trap */
+ ulawbyte = 0x02; /* optional CCITT trap */
#endif
out[i] = ulawbyte;
}