From ef6c16a32e6e4c00256728f5936d16353c65d7f7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 24 Nov 2012 14:27:33 +0000 Subject: [PATCH] mulaw: const-ify some arrays --- gst/law/mulaw-conversion.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/law/mulaw-conversion.c b/gst/law/mulaw-conversion.c index 190a9f5..15cde17 100755 --- a/gst/law/mulaw-conversion.c +++ b/gst/law/mulaw-conversion.c @@ -34,7 +34,8 @@ void mulaw_encode (gint16 * in, guint8 * out, gint numsamples) { - static gint16 exp_lut[256] = { 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, + static const gint16 exp_lut[256] = { + 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, @@ -100,7 +101,8 @@ mulaw_encode (gint16 * in, guint8 * out, gint numsamples) void mulaw_decode (guint8 * in, gint16 * out, gint numsamples) { - static gint16 exp_lut[8] = { 0, 132, 396, 924, 1980, 4092, 8316, 16764 }; + static const gint16 exp_lut[8] = + { 0, 132, 396, 924, 1980, 4092, 8316, 16764 }; gint16 sign, exponent, mantissa; guint8 ulawbyte; gint16 linear; -- 2.7.4