Commit ef6c16a3 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

mulaw: const-ify some arrays

parent 3be45f70
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment