AF_gain_table_u(3)					   AF_gain_table_u(3)



NAME
  AF_gain_table_u, AF_gain_table_a - ULAW and ALAW gain	tables

SYNTAX
  #include <AF/AFUtils.h>

  extern int AF_gain_min_u, AF_gain_max_u;

  extern unsigned char *AF_gain_table_u[];

  extern int AF_gain_min_a, AF_gain_max_a;

  extern unsigned char *AF_gain_table_a[];

DESCRIPTION
  AF_gain_table_u is an	array of precomputed gain tables for ULAW samples.
  AF_gain_table_a is the same thing, but for ALAW samples.  These tables are
  useful for effectivly	decompressing a	sample,	multiplying by a constant,
  and recompressing.  The tables are available in 1 dB steps from
  AF_gain_min_u	to AF_gain_max_u for ULAW samples.  (or	from AF_gain_min_a to
  AF_gain_max_a	for ALAW samples.)

EXAMPLES
  Typical usage	is:

  unsigned char	*gain_table;
  unsigned char	input, output;
  /* first select a particular table, for 5 dB gain */
  gain_table = AF_gain_table_u[	5 - AF_gain_min_u ];
  /* now translate the sample */
  output = gain_table[ input ];

DIAGNOSTICS
  If you index the table with an out-of-range linear value you may cause a
  protection fault and crash your application.

SEE ALSO
  AF(1)

BUGS
  If you encounter a reproducible bug, please submit a problem report to
  (af-bugs@crl.dec.com).

COPYRIGHT
  Copyright 1990-1994, Digital Equipment Corporation.
  See AF(1) for	a full statement of rights and permissions.

AUTHORS
  Tom Levergood	and Larry Stewart, Digital Cambridge Research Lab